mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-10 00:20:22 -06:00
Update dprint, don't force multiline imports for imports of single name (#58038)
This commit is contained in:
parent
66f5be9c0e
commit
4cedfe40b0
@ -19,7 +19,7 @@
|
||||
"arrowFunction.useParentheses": "preferNone",
|
||||
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
|
||||
"functionExpression.spaceAfterFunctionKeyword": true,
|
||||
"importDeclaration.forceMultiLine": true,
|
||||
"importDeclaration.forceMultiLine": "whenMultiple",
|
||||
"constructorType.spaceAfterNewKeyword": true,
|
||||
"constructSignature.spaceAfterNewKeyword": true,
|
||||
|
||||
@ -57,8 +57,8 @@
|
||||
],
|
||||
// Note: if adding new languages, make sure settings.template.json is updated too.
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
|
||||
"https://plugins.dprint.dev/json-0.19.1.wasm",
|
||||
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
|
||||
"https://plugins.dprint.dev/typescript-0.90.0.wasm",
|
||||
"https://plugins.dprint.dev/json-0.19.2.wasm",
|
||||
"https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c"
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,26 +1,16 @@
|
||||
// @ts-check
|
||||
import {
|
||||
CancelToken,
|
||||
} from "@esfx/canceltoken";
|
||||
import { CancelToken } from "@esfx/canceltoken";
|
||||
import assert from "assert";
|
||||
import chalk from "chalk";
|
||||
import chokidar from "chokidar";
|
||||
import esbuild from "esbuild";
|
||||
import {
|
||||
EventEmitter,
|
||||
} from "events";
|
||||
import { EventEmitter } from "events";
|
||||
import fs from "fs";
|
||||
import {
|
||||
glob,
|
||||
} from "glob";
|
||||
import {
|
||||
task,
|
||||
} from "hereby";
|
||||
import { glob } from "glob";
|
||||
import { task } from "hereby";
|
||||
import path from "path";
|
||||
|
||||
import {
|
||||
localizationDirectories,
|
||||
} from "./scripts/build/localization.mjs";
|
||||
import { localizationDirectories } from "./scripts/build/localization.mjs";
|
||||
import cmdLineOptions from "./scripts/build/options.mjs";
|
||||
import {
|
||||
buildProject,
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
import chalk from "chalk";
|
||||
import {
|
||||
readFileSync,
|
||||
} from "fs";
|
||||
import {
|
||||
join,
|
||||
} from "path";
|
||||
import { readFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
import playwright from "playwright";
|
||||
|
||||
// Turning this on will leave the Chromium browser open, giving you the
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
existsSync,
|
||||
} from "fs";
|
||||
import { existsSync } from "fs";
|
||||
import {
|
||||
dirname,
|
||||
join,
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
import {
|
||||
resolve,
|
||||
} from "path";
|
||||
import { resolve } from "path";
|
||||
|
||||
import {
|
||||
findUpRoot,
|
||||
} from "./findUpDir.mjs";
|
||||
import { findUpRoot } from "./findUpDir.mjs";
|
||||
import cmdLineOptions from "./options.mjs";
|
||||
import {
|
||||
Debouncer,
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
CancelError,
|
||||
} from "@esfx/canceltoken";
|
||||
import { CancelError } from "@esfx/canceltoken";
|
||||
import chalk from "chalk";
|
||||
import fs from "fs";
|
||||
import os from "os";
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import {
|
||||
CancelError,
|
||||
} from "@esfx/canceltoken";
|
||||
import { CancelError } from "@esfx/canceltoken";
|
||||
import assert from "assert";
|
||||
import chalk from "chalk";
|
||||
import {
|
||||
spawn,
|
||||
} from "child_process";
|
||||
import { spawn } from "child_process";
|
||||
import fs from "fs";
|
||||
import JSONC from "jsonc-parser";
|
||||
import which from "which";
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
import {
|
||||
createRequire,
|
||||
} from "module";
|
||||
import { createRequire } from "module";
|
||||
import {
|
||||
__importDefault,
|
||||
__importStar,
|
||||
} from "tslib";
|
||||
import {
|
||||
pathToFileURL,
|
||||
} from "url";
|
||||
import { pathToFileURL } from "url";
|
||||
|
||||
// This script tests that TypeScript's CJS API is structured
|
||||
// as expected. It calls "require" as though it were in CWD,
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import assert from "assert";
|
||||
import {
|
||||
execFileSync,
|
||||
} from "child_process";
|
||||
import { execFileSync } from "child_process";
|
||||
import {
|
||||
readFileSync,
|
||||
writeFileSync,
|
||||
|
||||
@ -5,9 +5,7 @@
|
||||
* bundle as namespaces again, even though the project is modules.
|
||||
*/
|
||||
|
||||
import assert, {
|
||||
fail,
|
||||
} from "assert";
|
||||
import assert, { fail } from "assert";
|
||||
import cp from "child_process";
|
||||
import fs from "fs";
|
||||
import minimist from "minimist";
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import fs from "fs";
|
||||
import fsPromises from "fs/promises";
|
||||
import {
|
||||
glob,
|
||||
} from "glob";
|
||||
import { glob } from "glob";
|
||||
|
||||
async function checkErrorBaselines() {
|
||||
const data = await fsPromises.readFile("src/compiler/diagnosticMessages.json", "utf-8");
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
// This file requires a modern version of node 14+, and grep to be available.
|
||||
|
||||
// node scripts/find-unused-diagnostic-messages.mjs
|
||||
import {
|
||||
execSync,
|
||||
} from "child_process";
|
||||
import {
|
||||
readFileSync,
|
||||
} from "fs";
|
||||
import {
|
||||
EOL,
|
||||
} from "os";
|
||||
import { execSync } from "child_process";
|
||||
import { readFileSync } from "fs";
|
||||
import { EOL } from "os";
|
||||
|
||||
const diags = readFileSync("src/compiler/diagnosticInformationMap.generated.ts", "utf8");
|
||||
const startOfDiags = diags.split("export const Diagnostics")[1];
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
XMLParser,
|
||||
} from "fast-xml-parser";
|
||||
import { XMLParser } from "fast-xml-parser";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
|
||||
@ -2,9 +2,7 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
import url from "url";
|
||||
|
||||
import {
|
||||
findUpRoot,
|
||||
} from "./build/findUpDir.mjs";
|
||||
import { findUpRoot } from "./build/findUpDir.mjs";
|
||||
|
||||
const __filename = url.fileURLToPath(new URL(import.meta.url));
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
Octokit,
|
||||
} from "@octokit/rest";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import assert from "assert";
|
||||
import ado from "azure-devops-node-api";
|
||||
import fetch from "node-fetch";
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
import fs from "fs";
|
||||
import {
|
||||
glob,
|
||||
} from "glob";
|
||||
import { glob } from "glob";
|
||||
import path from "path";
|
||||
import url from "url";
|
||||
|
||||
import {
|
||||
localizationDirectories,
|
||||
} from "./build/localization.mjs";
|
||||
import { localizationDirectories } from "./build/localization.mjs";
|
||||
|
||||
const __filename = url.fileURLToPath(new URL(import.meta.url));
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
isNodeLikeSystem,
|
||||
} from "./_namespaces/ts";
|
||||
import { isNodeLikeSystem } from "./_namespaces/ts";
|
||||
|
||||
// The following definitions provide the minimum compatible support for the Web Performance User Timings API
|
||||
// between browsers and NodeJS:
|
||||
|
||||
@ -5,9 +5,7 @@ import {
|
||||
identifierToKeywordKind,
|
||||
NodeFlags,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
deprecate,
|
||||
} from "../deprecate";
|
||||
import { deprecate } from "../deprecate";
|
||||
|
||||
declare module "../../compiler/types" {
|
||||
export interface Identifier {
|
||||
|
||||
@ -3,9 +3,7 @@ import {
|
||||
UnionToIntersection,
|
||||
Version,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
deprecate,
|
||||
} from "./deprecate";
|
||||
import { deprecate } from "./deprecate";
|
||||
|
||||
/** @internal */
|
||||
export interface DeprecationOptions {
|
||||
|
||||
@ -74,9 +74,7 @@ import {
|
||||
TodoCommentDescriptor,
|
||||
UserPreferences,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
protocol,
|
||||
} from "./_namespaces/ts.server";
|
||||
import { protocol } from "./_namespaces/ts.server";
|
||||
|
||||
export interface SessionClientHost extends LanguageServiceHost {
|
||||
writeMessage(message: string): void;
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
existsSync,
|
||||
} from "fs";
|
||||
import { existsSync } from "fs";
|
||||
import {
|
||||
dirname,
|
||||
join,
|
||||
|
||||
@ -5,9 +5,7 @@ import * as ts from "./_namespaces/ts";
|
||||
import * as Utils from "./_namespaces/Utils";
|
||||
import * as vfs from "./_namespaces/vfs";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
import {
|
||||
LoggerWithInMemoryLogs,
|
||||
} from "./tsserverLogger";
|
||||
import { LoggerWithInMemoryLogs } from "./tsserverLogger";
|
||||
|
||||
import ArrayOrSingle = FourSlashInterface.ArrayOrSingle;
|
||||
|
||||
|
||||
@ -6,25 +6,17 @@ import {
|
||||
virtualFileSystemRoot,
|
||||
} from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import {
|
||||
getNewLineCharacter,
|
||||
} from "./_namespaces/ts";
|
||||
import { getNewLineCharacter } from "./_namespaces/ts";
|
||||
import * as vfs from "./_namespaces/vfs";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
import {
|
||||
incrementalVerifier,
|
||||
} from "./incrementalUtils";
|
||||
import {
|
||||
patchServiceForStateBaseline,
|
||||
} from "./projectServiceStateLogger";
|
||||
import { incrementalVerifier } from "./incrementalUtils";
|
||||
import { patchServiceForStateBaseline } from "./projectServiceStateLogger";
|
||||
import {
|
||||
createLoggerWithInMemoryLogs,
|
||||
HarnessLSCouldNotResolveModule,
|
||||
LoggerWithInMemoryLogs,
|
||||
} from "./tsserverLogger";
|
||||
import {
|
||||
createWatchUtils,
|
||||
} from "./watchUtils";
|
||||
import { createWatchUtils } from "./watchUtils";
|
||||
|
||||
export function makeDefaultProxy(info: ts.server.PluginCreateInfo): ts.LanguageService {
|
||||
const proxy = Object.create(/*o*/ null); // eslint-disable-line no-null/no-null
|
||||
|
||||
@ -23,9 +23,7 @@ import {
|
||||
SourceMapFileWatcher,
|
||||
TextStorage,
|
||||
} from "./_namespaces/ts.server";
|
||||
import {
|
||||
LoggerWithInMemoryLogs,
|
||||
} from "./tsserverLogger";
|
||||
import { LoggerWithInMemoryLogs } from "./tsserverLogger";
|
||||
|
||||
interface ProjectData {
|
||||
projectStateVersion: Project["projectStateVersion"];
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as documents from "./_namespaces/documents";
|
||||
import {
|
||||
Compiler,
|
||||
} from "./_namespaces/Harness";
|
||||
import { Compiler } from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import * as Utils from "./_namespaces/Utils";
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import {
|
||||
Compiler,
|
||||
} from "./harnessIO";
|
||||
import { Compiler } from "./harnessIO";
|
||||
|
||||
export const HarnessLSCouldNotResolveModule = "HarnessLanguageService:: Could not resolve module";
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@ import {
|
||||
Version,
|
||||
versionMajorMinor,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
stringifyIndented,
|
||||
} from "./_namespaces/ts.server";
|
||||
import { stringifyIndented } from "./_namespaces/ts.server";
|
||||
|
||||
export interface TypingResolutionHost {
|
||||
directoryExists(path: string): boolean;
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
sys,
|
||||
} from "./_namespaces/ts";
|
||||
import { sys } from "./_namespaces/ts";
|
||||
|
||||
export type ActionSet = "action::set";
|
||||
export type ActionInvalidate = "action::invalidate";
|
||||
|
||||
@ -9,9 +9,7 @@ import {
|
||||
Ternary,
|
||||
tryFileExists,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
ProjectService,
|
||||
} from "./_namespaces/ts.server";
|
||||
import { ProjectService } from "./_namespaces/ts.server";
|
||||
|
||||
/** @internal */
|
||||
export interface PackageJsonCache {
|
||||
|
||||
@ -9,9 +9,7 @@ import {
|
||||
TextSpan,
|
||||
unchangedTextChangeRange,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
emptyArray,
|
||||
} from "./_namespaces/ts.server";
|
||||
import { emptyArray } from "./_namespaces/ts.server";
|
||||
import * as protocol from "./protocol";
|
||||
|
||||
const lineCollectionCapacity = 4;
|
||||
|
||||
@ -111,9 +111,7 @@ import {
|
||||
visitNode,
|
||||
visitNodes,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
ImportAdder,
|
||||
} from "../_namespaces/ts.codefix";
|
||||
import { ImportAdder } from "../_namespaces/ts.codefix";
|
||||
|
||||
/**
|
||||
* Finds members of the resolved type that are missing in the class pointed to by class decl
|
||||
|
||||
@ -389,9 +389,7 @@ import {
|
||||
VariableDeclaration,
|
||||
walkUpParenthesizedExpressions,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
StringCompletions,
|
||||
} from "./_namespaces/ts.Completions";
|
||||
import { StringCompletions } from "./_namespaces/ts.Completions";
|
||||
|
||||
// Exported only for tests
|
||||
/** @internal */
|
||||
|
||||
@ -6,9 +6,7 @@ import {
|
||||
SourceFileLike,
|
||||
SyntaxKind,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
TextRangeWithKind,
|
||||
} from "../_namespaces/ts.formatting";
|
||||
import { TextRangeWithKind } from "../_namespaces/ts.formatting";
|
||||
|
||||
/** @internal */
|
||||
export const enum FormattingRequestKind {
|
||||
|
||||
@ -2,9 +2,7 @@ import {
|
||||
emptyArray,
|
||||
SyntaxKind,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
FormattingContext,
|
||||
} from "../_namespaces/ts.formatting";
|
||||
import { FormattingContext } from "../_namespaces/ts.formatting";
|
||||
|
||||
/** @internal */
|
||||
export interface Rule {
|
||||
|
||||
@ -107,9 +107,7 @@ import {
|
||||
TypeReference,
|
||||
unescapeLeadingUnderscores,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
isContextWithStartAndEndNode,
|
||||
} from "./_namespaces/ts.FindAllReferences";
|
||||
import { isContextWithStartAndEndNode } from "./_namespaces/ts.FindAllReferences";
|
||||
|
||||
/** @internal */
|
||||
export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number, searchOtherFilesOnly?: boolean, stopAtAlias?: boolean): readonly DefinitionInfo[] | undefined {
|
||||
|
||||
@ -7,9 +7,7 @@ import {
|
||||
RefactorContext,
|
||||
RefactorEditInfo,
|
||||
} from "./_namespaces/ts";
|
||||
import {
|
||||
refactorKindBeginsWith,
|
||||
} from "./_namespaces/ts.refactor";
|
||||
import { refactorKindBeginsWith } from "./_namespaces/ts.refactor";
|
||||
|
||||
// A map with the refactor code as key, the refactor itself as value
|
||||
// e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want
|
||||
|
||||
@ -40,9 +40,7 @@ import {
|
||||
textChanges,
|
||||
TupleTypeNode,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
registerRefactor,
|
||||
} from "../_namespaces/ts.refactor";
|
||||
import { registerRefactor } from "../_namespaces/ts.refactor";
|
||||
|
||||
const refactorName = "Convert overload list to single signature";
|
||||
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature);
|
||||
|
||||
@ -104,9 +104,7 @@ import {
|
||||
TypeNode,
|
||||
VariableDeclaration,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
registerRefactor,
|
||||
} from "../_namespaces/ts.refactor";
|
||||
import { registerRefactor } from "../_namespaces/ts.refactor";
|
||||
|
||||
const refactorName = "Convert parameters to destructured object";
|
||||
const minimumParameterLength = 1;
|
||||
|
||||
@ -37,9 +37,7 @@ import {
|
||||
textChanges,
|
||||
Token,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
registerRefactor,
|
||||
} from "../_namespaces/ts.refactor";
|
||||
import { registerRefactor } from "../_namespaces/ts.refactor";
|
||||
|
||||
const refactorName = "Convert to template string";
|
||||
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string);
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
getModuleSpecifier,
|
||||
} from "../../compiler/moduleSpecifiers";
|
||||
import { getModuleSpecifier } from "../../compiler/moduleSpecifiers";
|
||||
import {
|
||||
AnyImportOrRequireStatement,
|
||||
append,
|
||||
@ -153,9 +151,7 @@ import {
|
||||
VariableDeclarationList,
|
||||
VariableStatement,
|
||||
} from "../_namespaces/ts";
|
||||
import {
|
||||
registerRefactor,
|
||||
} from "../refactorProvider";
|
||||
import { registerRefactor } from "../refactorProvider";
|
||||
|
||||
const refactorNameForMoveToFile = "Move to file";
|
||||
const description = getLocaleSpecificMessage(Diagnostics.Move_to_file);
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
getModuleSpecifierPreferences,
|
||||
} from "../compiler/moduleSpecifiers";
|
||||
import { getModuleSpecifierPreferences } from "../compiler/moduleSpecifiers";
|
||||
import {
|
||||
addToSeen,
|
||||
altDirectorySeparator,
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
TestRunnerKind,
|
||||
} from "../_namespaces/Harness";
|
||||
import { TestRunnerKind } from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
|
||||
export interface RunnerTask {
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
Baseline,
|
||||
} from "../_namespaces/Harness";
|
||||
import { Baseline } from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
describe("unittests:: canWatch::", () => {
|
||||
baselineCanWatch(
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
|
||||
describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => {
|
||||
function assertParseResult(subScenario: string, commandLine: string[], workerDiagnostic?: () => ts.ParseCommandLineWorkerDiagnostics) {
|
||||
|
||||
@ -2,9 +2,7 @@ import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
baselineParseConfigHost,
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
|
||||
describe("unittests:: config:: convertCompilerOptionsFromJson", () => {
|
||||
function baselineCompilerOptions(subScenario: string, json: any, configFileName: string) {
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
|
||||
describe("unittests:: config:: convertTypeAcquisitionFromJson", () => {
|
||||
function baselineTypeAcquisition(subScenario: string, json: any, configFileName: string) {
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
|
||||
const caseInsensitiveBasePath = "c:/dev/";
|
||||
const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json";
|
||||
|
||||
@ -2,12 +2,8 @@ import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
|
||||
describe("unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson", () => {
|
||||
function formatErrors(errors: readonly ts.Diagnostic[]) {
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
|
||||
describe("unittests:: config:: tsconfigParsingWatchOptions:: parseConfigFileTextToJson", () => {
|
||||
interface VerifyWatchOptions {
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
deprecate,
|
||||
} from "../../deprecatedCompat/deprecate";
|
||||
import { deprecate } from "../../deprecatedCompat/deprecate";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
|
||||
describe("unittests:: debugDeprecation", () => {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
ScriptTarget,
|
||||
} from "../../_namespaces/ts";
|
||||
import { ScriptTarget } from "../../_namespaces/ts";
|
||||
|
||||
describe("unittests:: evaluation:: esDecorators", () => {
|
||||
const options: ts.CompilerOptions = { target: ts.ScriptTarget.ES2021 };
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
ScriptTarget,
|
||||
} from "../../_namespaces/ts";
|
||||
import { ScriptTarget } from "../../_namespaces/ts";
|
||||
|
||||
describe("unittests:: evaluation:: esDecoratorsMetadata", () => {
|
||||
const nodeVersion = new ts.Version(process.versions.node);
|
||||
|
||||
@ -1,15 +1,7 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
} from "./contents";
|
||||
import {
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { FsContents } from "./contents";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
|
||||
export function getFsConentsForAlternateResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) {
|
||||
return jsonToReadableText({
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
TscCompileSystem,
|
||||
} from "./tsc";
|
||||
import {
|
||||
TestServerHost,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { TscCompileSystem } from "./tsc";
|
||||
import { TestServerHost } from "./virtualFileSystemWithWatch";
|
||||
|
||||
export type CommandLineProgram = [ts.Program, ts.BuilderProgram?];
|
||||
export interface CommandLineCallbacks {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
|
||||
export function compilerOptionsToConfigJson(options: ts.CompilerOptions) {
|
||||
return ts.optionMapToObject(ts.serializeCompilerOptions(options));
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "./vfs";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "./vfs";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "./vfs";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
getProjectConfigWithNodeNext,
|
||||
} from "./contents";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "./vfs";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
commandLineCallbacks,
|
||||
} from "./baseline";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { commandLineCallbacks } from "./baseline";
|
||||
import {
|
||||
makeSystemReadyForBaseline,
|
||||
TscCompileSystem,
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
FsContents,
|
||||
getProjectConfigWithNodeNext,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import {
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
|
||||
export function getFsContentsForTransitiveReferencesRefsAdts() {
|
||||
return dedent`
|
||||
|
||||
@ -2,9 +2,7 @@ import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
baselinePrograms,
|
||||
CommandLineCallbacks,
|
||||
|
||||
@ -2,12 +2,8 @@ import {
|
||||
verifyProgramStructure,
|
||||
verifyResolutionCache,
|
||||
} from "../../../harness/incrementalUtils";
|
||||
import {
|
||||
patchHostForBuildInfoReadWrite,
|
||||
} from "../../_namespaces/fakes";
|
||||
import {
|
||||
Baseline,
|
||||
} from "../../_namespaces/Harness";
|
||||
import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes";
|
||||
import { Baseline } from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
baselinePrograms,
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
import {
|
||||
incrementalVerifier,
|
||||
} from "../../../harness/incrementalUtils";
|
||||
import {
|
||||
patchServiceForStateBaseline,
|
||||
} from "../../../harness/projectServiceStateLogger";
|
||||
import { incrementalVerifier } from "../../../harness/incrementalUtils";
|
||||
import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger";
|
||||
import {
|
||||
createLoggerWithInMemoryLogs,
|
||||
LoggerWithInMemoryLogs,
|
||||
} from "../../../harness/tsserverLogger";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
ensureErrorFreeBuild,
|
||||
} from "./solutionBuilder";
|
||||
import { ensureErrorFreeBuild } from "./solutionBuilder";
|
||||
import {
|
||||
customTypesMap,
|
||||
TestTypingsInstallerAdapter,
|
||||
|
||||
@ -3,15 +3,9 @@ import {
|
||||
nowString,
|
||||
} from "../../../harness/tsserverLogger";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
stringifyIndented,
|
||||
} from "../../_namespaces/ts.server";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
TestSession,
|
||||
} from "./tsserver";
|
||||
import { stringifyIndented } from "../../_namespaces/ts.server";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { TestSession } from "./tsserver";
|
||||
import {
|
||||
File,
|
||||
TestServerHost,
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
import {
|
||||
getDirectoryPath,
|
||||
} from "../../_namespaces/ts";
|
||||
import { getDirectoryPath } from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { libContent } from "./contents";
|
||||
|
||||
export interface FsOptions {
|
||||
libContentToAppend?: string;
|
||||
|
||||
@ -44,12 +44,8 @@ import {
|
||||
sys,
|
||||
toPath,
|
||||
} from "../../_namespaces/ts";
|
||||
import {
|
||||
typingsInstaller,
|
||||
} from "../../_namespaces/ts.server";
|
||||
import {
|
||||
timeIncrements,
|
||||
} from "../../_namespaces/vfs";
|
||||
import { typingsInstaller } from "../../_namespaces/ts.server";
|
||||
import { timeIncrements } from "../../_namespaces/vfs";
|
||||
|
||||
export const libFile: File = {
|
||||
path: "/a/lib/lib.d.ts",
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "./helpers";
|
||||
|
||||
interface File {
|
||||
name: string;
|
||||
|
||||
@ -3,9 +3,7 @@ import * as fakes from "../_namespaces/fakes";
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as vfs from "../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "./helpers";
|
||||
import { jsonToReadableText } from "./helpers";
|
||||
|
||||
function verifyMissingFilePaths(missing: ReturnType<ts.Program["getMissingFilePaths"]>, expected: readonly string[]) {
|
||||
assert.isDefined(missing);
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as ts from "../../../_namespaces/ts";
|
||||
import {
|
||||
testExtractSymbol,
|
||||
} from "./helpers";
|
||||
import { testExtractSymbol } from "./helpers";
|
||||
|
||||
describe("unittests:: services:: extract:: extractFunctions", () => {
|
||||
testExtractFunction(
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
import {
|
||||
incrementalVerifier,
|
||||
} from "../../../../harness/incrementalUtils";
|
||||
import {
|
||||
createHasErrorMessageLogger,
|
||||
} from "../../../../harness/tsserverLogger";
|
||||
import { incrementalVerifier } from "../../../../harness/incrementalUtils";
|
||||
import { createHasErrorMessageLogger } from "../../../../harness/tsserverLogger";
|
||||
import * as Harness from "../../../_namespaces/Harness";
|
||||
import * as ts from "../../../_namespaces/ts";
|
||||
import {
|
||||
customTypesMap,
|
||||
} from "../../helpers/typingsInstaller";
|
||||
import { customTypesMap } from "../../helpers/typingsInstaller";
|
||||
import {
|
||||
createServerHost,
|
||||
libFile,
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as ts from "../../../_namespaces/ts";
|
||||
import {
|
||||
extractTest,
|
||||
} from "./helpers";
|
||||
import { extractTest } from "./helpers";
|
||||
|
||||
function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) {
|
||||
return it(caption, () => {
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import {
|
||||
expect,
|
||||
} from "chai";
|
||||
import { expect } from "chai";
|
||||
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
createServerHost,
|
||||
File,
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
|
||||
describe("unittests:: services:: PreProcessFile:", () => {
|
||||
function test(sourceText: string, readImportFile: boolean, detectJavaScriptImports: boolean, expectedPreProcess: ts.PreProcessedFileInfo): void {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
notImplementedHost,
|
||||
} from "./extract/helpers";
|
||||
import { notImplementedHost } from "./extract/helpers";
|
||||
|
||||
// Some tests have trailing whitespace
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
import {
|
||||
IO,
|
||||
} from "../../_namespaces/Harness";
|
||||
import { IO } from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
defer,
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import {
|
||||
appendText,
|
||||
loadProjectFromFiles,
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import {
|
||||
noop,
|
||||
} from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { noop } from "../../_namespaces/ts";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
noChangeRun,
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild - clean::", () => {
|
||||
verifyTsc({
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
compilerOptionsToConfigJson,
|
||||
} from "../helpers/contents";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { compilerOptionsToConfigJson } from "../helpers/contents";
|
||||
import {
|
||||
noChangeRun,
|
||||
TestTscEdit,
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
noChangeRun,
|
||||
verifyTsc,
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: configFileExtends:: when tsconfig extends another config", () => {
|
||||
function getConfigExtendsWithIncludeFs() {
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
noChangeOnlyRuns,
|
||||
verifyTsc,
|
||||
|
||||
@ -1,22 +1,12 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
FileSet,
|
||||
} from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
libContent,
|
||||
} from "../helpers/contents";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { FileSet } from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { libContent } from "../helpers/contents";
|
||||
import {
|
||||
noChangeOnlyRuns,
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: declarationEmit", () => {
|
||||
function getFiles(): FileSet {
|
||||
|
||||
@ -3,12 +3,8 @@ import {
|
||||
getFsContentsForDemoProjectReferencesCoreConfig,
|
||||
getFsForDemoProjectReferences,
|
||||
} from "../helpers/demoProjectReferences";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
prependText,
|
||||
} from "../helpers/vfs";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { prependText } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: on demo project", () => {
|
||||
let projFs: vfs.FileSystem;
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
replaceText,
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild - empty files option in tsconfig", () => {
|
||||
verifyTsc({
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
// https://github.com/microsoft/TypeScript/issues/33849
|
||||
describe("unittests:: tsbuild:: exitCodeOnBogusFile:: test exit code", () => {
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
getSymlinkedExtendsSys,
|
||||
} from "../helpers/extends";
|
||||
import {
|
||||
verifyTscWatch,
|
||||
} from "../helpers/tscWatch";
|
||||
import { getSymlinkedExtendsSys } from "../helpers/extends";
|
||||
import { verifyTscWatch } from "../helpers/tscWatch";
|
||||
|
||||
describe("unittests:: tsbuild:: extends::", () => {
|
||||
verifyTscWatch({
|
||||
|
||||
@ -1,19 +1,9 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
compilerOptionsToConfigJson,
|
||||
} from "../helpers/contents";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { compilerOptionsToConfigJson } from "../helpers/contents";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: fileDelete::", () => {
|
||||
function fs(childOptions: ts.CompilerOptions, mainOptions?: ts.CompilerOptions) {
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
|
||||
describe("unittests:: tsbuild - graph-ordering", () => {
|
||||
let host: fakes.SolutionBuilderHost | undefined;
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import {
|
||||
appendText,
|
||||
loadProjectFromFiles,
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
import * as Utils from "../../_namespaces/Utils";
|
||||
import {
|
||||
symbolLibContent,
|
||||
} from "../helpers/contents";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { symbolLibContent } from "../helpers/contents";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: javascriptProjectEmit::", () => {
|
||||
verifyTsc({
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import {
|
||||
appendText,
|
||||
loadProjectFromFiles,
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
getFsForLibResolution,
|
||||
} from "../helpers/libraryResolution";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import { getFsForLibResolution } from "../helpers/libraryResolution";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
|
||||
describe("unittests:: tsbuild:: libraryResolution:: library file resolution", () => {
|
||||
function verify(libRedirection?: true) {
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Utils from "../../_namespaces/Utils";
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
noChangeOnlyRuns,
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
verifyTscWatch,
|
||||
} from "../helpers/tscWatch";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { verifyTscWatch } from "../helpers/tscWatch";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
|
||||
@ -1,16 +1,8 @@
|
||||
import * as Utils from "../../_namespaces/Utils";
|
||||
import {
|
||||
symbolLibContent,
|
||||
} from "../helpers/contents";
|
||||
import {
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import {
|
||||
libFile,
|
||||
} from "../helpers/virtualFileSystemWithWatch";
|
||||
import { symbolLibContent } from "../helpers/contents";
|
||||
import { verifyTsc } from "../helpers/tsc";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
import { libFile } from "../helpers/virtualFileSystemWithWatch";
|
||||
|
||||
// https://github.com/microsoft/TypeScript/issues/31696
|
||||
describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => {
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
import {
|
||||
jsonToReadableText,
|
||||
} from "../helpers";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import {
|
||||
noChangeRun,
|
||||
verifyTsc,
|
||||
} from "../helpers/tsc";
|
||||
import {
|
||||
loadProjectFromFiles,
|
||||
} from "../helpers/vfs";
|
||||
import { loadProjectFromFiles } from "../helpers/vfs";
|
||||
|
||||
describe("unittests:: tsbuild:: noEmit", () => {
|
||||
function verifyNoEmitWorker(subScenario: string, aTsContent: string, commandLineArgs: readonly string[]) {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import {
|
||||
getFsForNoEmitOnError,
|
||||
} from "../helpers/noEmitOnError";
|
||||
import { getFsForNoEmitOnError } from "../helpers/noEmitOnError";
|
||||
import {
|
||||
noChangeRun,
|
||||
verifyTsc,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user