From acb7cf9c3eb1d7bdd17ae081bef39a12faf6d8a7 Mon Sep 17 00:00:00 2001 From: Philipp Zins Date: Thu, 27 Sep 2018 21:00:00 +0200 Subject: [PATCH 1/4] improve error message TS2307 --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/services/codefixes/fixCannotFindModule.ts | 2 +- src/testRunner/unittests/tsbuild.ts | 2 +- src/testRunner/unittests/tscWatchMode.ts | 2 +- .../unittests/tsserverProjectSystem.ts | 20 +- .../aliasesInSystemModule1.errors.txt | 4 +- .../aliasesInSystemModule2.errors.txt | 4 +- ...alModuleInAnotherExternalModule.errors.txt | 4 +- ...lativeExternalImportDeclaration.errors.txt | 4 +- .../amdDependencyComment1.errors.txt | 4 +- .../amdDependencyComment2.errors.txt | 4 +- .../amdDependencyCommentName1.errors.txt | 4 +- .../amdDependencyCommentName2.errors.txt | 4 +- .../amdDependencyCommentName3.errors.txt | 4 +- .../amdDependencyCommentName4.errors.txt | 16 +- ...syncAwaitIsolatedModules_es2017.errors.txt | 4 +- .../asyncAwaitIsolatedModules_es5.errors.txt | 4 +- .../asyncAwaitIsolatedModules_es6.errors.txt | 4 +- .../badExternalModuleReference.errors.txt | 4 +- .../cachedModuleResolution6.errors.txt | 8 +- .../cachedModuleResolution7.errors.txt | 8 +- .../cachedModuleResolution8.errors.txt | 8 +- .../cachedModuleResolution9.errors.txt | 8 +- .../commentOnImportStatement1.errors.txt | 4 +- .../commentOnImportStatement2.errors.txt | 4 +- .../commentOnImportStatement3.errors.txt | 4 +- .../copyrightWithNewLine1.errors.txt | 4 +- .../copyrightWithoutNewLine1.errors.txt | 4 +- .../deduplicateImportsInSystem.errors.txt | 24 +- .../defaultExportsCannotMerge01.errors.txt | 4 +- .../defaultExportsCannotMerge02.errors.txt | 4 +- .../defaultExportsCannotMerge03.errors.txt | 4 +- ...ImportInDefaultExportExpression.errors.txt | 4 +- .../reference/emptyModuleName.errors.txt | 4 +- .../es5ModuleInternalNamedImports.errors.txt | 4 +- ...rtNamedImportIdentifiersParsing.errors.txt | 20 +- .../es6modulekindWithES5Target10.errors.txt | 4 +- .../es6modulekindWithES5Target9.errors.txt | 20 +- ...aultWhenAllNamedAreDefaultAlias.errors.txt | 4 +- ...sExportStarWhenDefaultPlusNames.errors.txt | 4 +- ...esnextmodulekindWithES5Target10.errors.txt | 4 +- .../esnextmodulekindWithES5Target9.errors.txt | 20 +- ...mportCallExpressionGrammarError.errors.txt | 4 +- ...eingExternalModuleWithNoResolve.errors.txt | 8 +- ...importEmptyFromModuleNotExisted.errors.txt | 4 +- .../reference/importInsideModule.errors.txt | 4 +- .../importNotElidedWhenNotFound.errors.txt | 16 +- .../importTypeAmbientMissing.errors.txt | 4 +- .../importTypeLocalMissing.errors.txt | 12 +- ...portWithTrailingSlash_noResolve.errors.txt | 4 +- ...latedModulesImportExportElision.errors.txt | 16 +- ...alTypeNameAssertionNotTriggered.errors.txt | 4 +- .../reference/metadataImportType.errors.txt | 4 +- ...ugmentationDisallowedExtensions.errors.txt | 16 +- ...eAugmentationImportsAndExports2.errors.txt | 8 +- ...eAugmentationImportsAndExports3.errors.txt | 4 +- .../noAssertForUnparseableTypedefs.errors.txt | 4 +- .../packageJsonMain_isNonRecursive.errors.txt | 4 +- ...tion_withExtension_failedLookup.errors.txt | 4 +- .../privacyGloImportParseErrors.errors.txt | 8 +- .../privacyImportParseErrors.errors.txt | 40 +- .../amd/cantFindTheModule.errors.txt | 12 +- .../node/cantFindTheModule.errors.txt | 12 +- ...MetadataCommonJSISolatedModules.errors.txt | 4 +- ...MetadataCommonJSISolatedModules.errors.txt | 4 +- ...ommonJSISolatedModulesNoResolve.errors.txt | 4 +- ...ommonJSISolatedModulesNoResolve.errors.txt | 4 +- .../emitDecoratorMetadataSystemJS.errors.txt | 4 +- .../emitDecoratorMetadataSystemJS.errors.txt | 4 +- ...MetadataSystemJSISolatedModules.errors.txt | 4 +- ...MetadataSystemJSISolatedModules.errors.txt | 4 +- ...ystemJSISolatedModulesNoResolve.errors.txt | 4 +- ...ystemJSISolatedModulesNoResolve.errors.txt | 4 +- .../amd/intReferencingExtAndInt.errors.txt | 4 +- .../node/intReferencingExtAndInt.errors.txt | 4 +- ...calModuleWithRecursiveTypecheck.errors.txt | 4 +- ...calModuleWithRecursiveTypecheck.errors.txt | 4 +- ...dModuleDeclarationsInsideModule.errors.txt | 8 +- ...dModuleDeclarationsInsideModule.errors.txt | 8 +- ...arationsInsideNonExportedModule.errors.txt | 8 +- ...arationsInsideNonExportedModule.errors.txt | 8 +- ...leImportStatementInParentModule.errors.txt | 8 +- ...leImportStatementInParentModule.errors.txt | 8 +- ...elativeNamesInClassicResolution.errors.txt | 4 +- .../relativePathMustResolve.errors.txt | 4 +- ...FileNonRelativeWithoutExtension.errors.txt | 8 +- .../requireOfJsonFileWithAmd.errors.txt | 8 +- ...ireOfJsonFileWithModuleEmitNone.errors.txt | 4 +- ...quireOfJsonFileWithoutExtension.errors.txt | 4 +- .../shorthand-property-es5-es6.errors.txt | 4 +- .../shorthand-property-es6-amd.errors.txt | 4 +- .../shorthand-property-es6-es6.errors.txt | 4 +- ...ndPropertyAssignmentInES6Module.errors.txt | 4 +- ...vedWordInImportEqualDeclaration.errors.txt | 4 +- ...rictModeWordInImportDeclaration.errors.txt | 12 +- .../reference/systemModule10.errors.txt | 8 +- .../reference/systemModule10_ES5.errors.txt | 8 +- .../reference/systemModule11.errors.txt | 24 +- .../reference/systemModule12.errors.txt | 4 +- .../reference/systemModule14.errors.txt | 4 +- .../reference/systemModule16.errors.txt | 24 +- .../reference/systemModule9.errors.txt | 24 +- .../topLevelFileModuleMissing.errors.txt | 4 +- .../tsxNoTypeAnnotatedSFC.errors.txt | 4 +- .../umdDependencyComment2.errors.txt | 4 +- .../umdDependencyCommentName1.errors.txt | 4 +- .../umdDependencyCommentName2.errors.txt | 4 +- .../undeclaredModuleError.errors.txt | 4 +- .../unusedInvalidTypeArguments.errors.txt | 16 +- tests/baselines/reference/user/acorn.log | 2 +- .../reference/user/adonis-framework.log | 38 +- tests/baselines/reference/user/bcryptjs.log | 4 +- .../user/chrome-devtools-frontend.log | 62 +- .../reference/user/create-react-app.log | 66 +- tests/baselines/reference/user/npm.log | 1048 ++++++++--------- tests/baselines/reference/user/prettier.log | 4 +- 117 files changed, 997 insertions(+), 997 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bd6c5d02cbe63..a380305d4c4f3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2239,7 +2239,7 @@ namespace ts { } function resolveExternalModuleName(location: Node, moduleReferenceExpression: Expression): Symbol | undefined { - return resolveExternalModuleNameWorker(location, moduleReferenceExpression, Diagnostics.Cannot_find_module_0); + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations); } function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage | undefined, isForAugmentation = false): Symbol | undefined { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 02e20b0fb7a95..19a4c1f22fbdc 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1040,7 +1040,7 @@ "category": "Error", "code": 2306 }, - "Cannot find module '{0}'.": { + "Cannot find module '{0}' or its corresponding type declarations.": { "category": "Error", "code": 2307 }, diff --git a/src/services/codefixes/fixCannotFindModule.ts b/src/services/codefixes/fixCannotFindModule.ts index 1c7070c74bf95..e32235c515500 100644 --- a/src/services/codefixes/fixCannotFindModule.ts +++ b/src/services/codefixes/fixCannotFindModule.ts @@ -4,7 +4,7 @@ namespace ts.codefix { const fixIdInstallTypesPackage = "installTypesPackage"; const fixIdGenerateTypes = "generateTypes"; - const errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0.code; + const errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code; const errorCodes = [ errorCodeCannotFindModule, Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code, diff --git a/src/testRunner/unittests/tsbuild.ts b/src/testRunner/unittests/tsbuild.ts index 72b1121e861a7..94f850d0a2b82 100644 --- a/src/testRunner/unittests/tsbuild.ts +++ b/src/testRunner/unittests/tsbuild.ts @@ -451,7 +451,7 @@ export const b = new A();`); ]; verifyBuild(fs => modifyFsBTsToNonRelativeImport(fs, "node"), allExpectedOutputs, - [Diagnostics.Cannot_find_module_0], + [Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations], expectedFileTraces); }); }); diff --git a/src/testRunner/unittests/tscWatchMode.ts b/src/testRunner/unittests/tscWatchMode.ts index 65f64b9da7829..bc82fe21207c6 100644 --- a/src/testRunner/unittests/tscWatchMode.ts +++ b/src/testRunner/unittests/tscWatchMode.ts @@ -232,7 +232,7 @@ namespace ts.tscWatch { function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { const quotedModuleName = `"${moduleName}"`; - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0, moduleName); + return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName); } describe("tsc-watch program updates", () => { diff --git a/src/testRunner/unittests/tsserverProjectSystem.ts b/src/testRunner/unittests/tsserverProjectSystem.ts index b292ec5486c3e..019f0db04b454 100644 --- a/src/testRunner/unittests/tsserverProjectSystem.ts +++ b/src/testRunner/unittests/tsserverProjectSystem.ts @@ -4792,7 +4792,7 @@ var x = 10;` host.runQueuedTimeoutCallbacks(); diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); assert.equal(diags.length, 1); @@ -4843,7 +4843,7 @@ var x = 10;` host.runQueuedTimeoutCallbacks(); diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); moduleFile.path = moduleFileOldPath; @@ -4918,7 +4918,7 @@ var x = 10;` ); let diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); host.reloadFS([file1, moduleFile]); @@ -4975,7 +4975,7 @@ var x = 10;` checkErrorMessage(session, "semanticDiag", { file: file1.path, diagnostics: [ - createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0, ["pad"]) + createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, ["pad"]) ], }); session.clearMessages(); @@ -7152,8 +7152,8 @@ var x = 10;` let diags = project.getLanguageService().getSemanticDiagnostics(root.path); assert.equal(diags.length, 1); const diag = diags[0]; - assert.equal(diag.code, Diagnostics.Cannot_find_module_0.code); - assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'."); + assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code); + assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar' or its corresponding type declarations."); callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path); @@ -7386,8 +7386,8 @@ var x = 10;` const project = service.configuredProjects.get(tsconfig.path)!; checkProjectActualFiles(project, files.map(f => f.path)); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); const debugTypesFile: File = { path: `${projectLocation}/node_modules/debug/index.d.ts`, @@ -7594,7 +7594,7 @@ var x = 10;` const project = service.configuredProjects.get(tsconfig.path)!; checkProjectActualFiles(project, files.map(f => f.path)); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); const debugTypesFile: File = { path: `${projectLocation}/node_modules/@types/debug/index.d.ts`, @@ -8552,7 +8552,7 @@ new C();` verifyWatchedFilesAndDirectories(session.host, filesInProjectWithUnresolvedModule, watchedDirectoriesWithUnresolvedModule, nonRecursiveWatchedDirectories); const startOffset = recognizersDateTimeSrcFile.content.indexOf('"') + 1; verifyErrors(session, [ - createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0, [moduleName]) + createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, [moduleName]) ]); } diff --git a/tests/baselines/reference/aliasesInSystemModule1.errors.txt b/tests/baselines/reference/aliasesInSystemModule1.errors.txt index d84223cc8a3ee..0d04ec6203d31 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo'. +tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== tests/cases/compiler/aliasesInSystemModule1.ts (1 errors) ==== import alias = require('foo'); ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/aliasesInSystemModule2.errors.txt b/tests/baselines/reference/aliasesInSystemModule2.errors.txt index a1456b04cd824..d1ba8a1df831e 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo'. +tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== tests/cases/compiler/aliasesInSystemModule2.ts (1 errors) ==== import {alias} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index 0757ba10e2e23..bd0137ffa34fe 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found. -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext'. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext' or its corresponding type declarations. ==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== @@ -15,5 +15,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): erro // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! error TS2307: Cannot find module 'ext'. +!!! error TS2307: Cannot find module 'ext' or its corresponding type declarations. var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt index b7ccdc8df92ea..304081ff97fed 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. -tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule'. +tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule' or its corresponding type declarations. ==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. ~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './SubModule'. +!!! error TS2307: Cannot find module './SubModule' or its corresponding type declarations. class SubModule { public static StaticVar: number; public InstanceVar: number; diff --git a/tests/baselines/reference/amdDependencyComment1.errors.txt b/tests/baselines/reference/amdDependencyComment1.errors.txt index f3b5a5c06ccde..9806527857445 100644 --- a/tests/baselines/reference/amdDependencyComment1.errors.txt +++ b/tests/baselines/reference/amdDependencyComment1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index e7d81514b906a..5f194cc081dfe 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName1.errors.txt b/tests/baselines/reference/amdDependencyCommentName1.errors.txt index f9e29ffe4c9ca..c5a8b31c814b4 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyCommentName1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName2.errors.txt b/tests/baselines/reference/amdDependencyCommentName2.errors.txt index de9350187eaf3..935e839abbb27 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName3.errors.txt b/tests/baselines/reference/amdDependencyCommentName3.errors.txt index 6c3f1583314af..1da4d3c358a49 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName4.errors.txt b/tests/baselines/reference/amdDependencyCommentName4.errors.txt index 8031a651d0a6d..fb666eb711943 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1'. -tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2'. -tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3'. -tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4'. +tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. ==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ==== @@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f import r1 = require("aliasedModule1"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule1'. +!!! error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. r1; import {p1, p2, p3} from "aliasedModule2"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule2'. +!!! error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. p1; import d from "aliasedModule3"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule3'. +!!! error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. d; import * as ns from "aliasedModule4"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule4'. +!!! error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. ns; import "unaliasedModule2"; \ No newline at end of file diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt index 95927c283aa4b..25392e59232af 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing'. +tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. ==== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing'. +!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt index 7d46517ca159f..da84692b5326d 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing'. +tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. ==== tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing'. +!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt index 068fbb604e1e9..ddd91b09afbdc 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing'. +tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. ==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing'. +!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index e5caaaf296fb4..1133400b65a97 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage'. +tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage' or its corresponding type declarations. ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! error TS2307: Cannot find module 'garbage'. +!!! error TS2307: Cannot find module 'garbage' or its corresponding type declarations. export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/cachedModuleResolution6.errors.txt b/tests/baselines/reference/cachedModuleResolution6.errors.txt index 7d79a200e11ed..e80de6969f6a4 100644 --- a/tests/baselines/reference/cachedModuleResolution6.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution6.errors.txt @@ -1,13 +1,13 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'. +/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. \ No newline at end of file +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution7.errors.txt b/tests/baselines/reference/cachedModuleResolution7.errors.txt index 9bc6e3f239cd7..8274accb5b883 100644 --- a/tests/baselines/reference/cachedModuleResolution7.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution7.errors.txt @@ -1,14 +1,14 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'. +/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution8.errors.txt b/tests/baselines/reference/cachedModuleResolution8.errors.txt index 7d79a200e11ed..e80de6969f6a4 100644 --- a/tests/baselines/reference/cachedModuleResolution8.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution8.errors.txt @@ -1,13 +1,13 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'. +/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. \ No newline at end of file +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution9.errors.txt b/tests/baselines/reference/cachedModuleResolution9.errors.txt index 482a34cb654f3..0dc795af6b3ba 100644 --- a/tests/baselines/reference/cachedModuleResolution9.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution9.errors.txt @@ -1,15 +1,15 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'. +/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index c6dcaf31c4f77..5fb5009fa23c7 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo'. +tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement2.errors.txt b/tests/baselines/reference/commentOnImportStatement2.errors.txt index 31f11a1c14830..15e1b29db4e63 100644 --- a/tests/baselines/reference/commentOnImportStatement2.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo'. +tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/commentOnImportStatement2.ts (1 errors) ==== /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement3.errors.txt b/tests/baselines/reference/commentOnImportStatement3.errors.txt index ec47c42dc41b1..5a2a5323bf02b 100644 --- a/tests/baselines/reference/commentOnImportStatement3.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo'. +tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/commentOnImportStatement3.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot fi /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index 9f5932a2b2ec7..21c19c41741ed 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter'. +tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. ==== tests/cases/compiler/copyrightWithNewLine1.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find m import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter'. +!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index 71194988ca235..51bc742228672 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter'. +tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. ==== tests/cases/compiler/copyrightWithoutNewLine1.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot fin ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter'. +!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt index 3ce3f88c81786..e77bd5cfaa033 100644 --- a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt +++ b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt @@ -1,29 +1,29 @@ -tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1'. -tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2'. -tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3'. -tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2'. -tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2'. -tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1'. +tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. ==== tests/cases/compiler/deduplicateImportsInSystem.ts (6 errors) ==== import {A} from "f1"; ~~~~ -!!! error TS2307: Cannot find module 'f1'. +!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. import {B} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2'. +!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. import {C} from "f3"; ~~~~ -!!! error TS2307: Cannot find module 'f3'. +!!! error TS2307: Cannot find module 'f3' or its corresponding type declarations. import {D} from 'f2'; ~~~~ -!!! error TS2307: Cannot find module 'f2'. +!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. import {E} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2'. +!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. import {F} from 'f1'; ~~~~ -!!! error TS2307: Cannot find module 'f1'. +!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. console.log(A + B + C + D + E + F) \ No newline at end of file diff --git a/tests/baselines/reference/defaultExportsCannotMerge01.errors.txt b/tests/baselines/reference/defaultExportsCannotMerge01.errors.txt index 5c28d8ee14135..ab8bf95686e51 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge01.errors.txt +++ b/tests/baselines/reference/defaultExportsCannotMerge01.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/modules/m1.ts(1,25): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. tests/cases/conformance/es6/modules/m1.ts(10,18): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. -tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'. +tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations. ==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ==== @@ -28,7 +28,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul ==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ==== import Entity from "m1" ~~~~ -!!! error TS2307: Cannot find module 'm1'. +!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations. Entity(); diff --git a/tests/baselines/reference/defaultExportsCannotMerge02.errors.txt b/tests/baselines/reference/defaultExportsCannotMerge02.errors.txt index 737a481487b96..084fb7c452b86 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge02.errors.txt +++ b/tests/baselines/reference/defaultExportsCannotMerge02.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/modules/m1.ts(1,22): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. tests/cases/conformance/es6/modules/m1.ts(4,18): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. -tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'. +tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations. ==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ==== @@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul ==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ==== import Entity from "m1" ~~~~ -!!! error TS2307: Cannot find module 'm1'. +!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations. Entity(); diff --git a/tests/baselines/reference/defaultExportsCannotMerge03.errors.txt b/tests/baselines/reference/defaultExportsCannotMerge03.errors.txt index 7452554fd352b..4560d83406197 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge03.errors.txt +++ b/tests/baselines/reference/defaultExportsCannotMerge03.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/modules/m1.ts(1,22): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. tests/cases/conformance/es6/modules/m1.ts(4,11): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead. -tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'. +tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations. ==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ==== @@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul ==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ==== import Entity from "m1" ~~~~ -!!! error TS2307: Cannot find module 'm1'. +!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations. Entity(); diff --git a/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt b/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt index 8bf6704b74358..5c1b13a5d0199 100644 --- a/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt +++ b/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS2307: Cannot find module './foo2'. +tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS2307: Cannot find module './foo2' or its corresponding type declarations. ==== tests/cases/compiler/dynamicImportInDefaultExportExpression.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS23 getInstance: function () { return import('./foo2'); ~~~~~~~~ -!!! error TS2307: Cannot find module './foo2'. +!!! error TS2307: Cannot find module './foo2' or its corresponding type declarations. } } \ No newline at end of file diff --git a/tests/baselines/reference/emptyModuleName.errors.txt b/tests/baselines/reference/emptyModuleName.errors.txt index 16f04b247ea24..234115c02568b 100644 --- a/tests/baselines/reference/emptyModuleName.errors.txt +++ b/tests/baselines/reference/emptyModuleName.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/emptyModuleName.ts(1,20): error TS2307: Cannot find module ''. +tests/cases/compiler/emptyModuleName.ts(1,20): error TS2307: Cannot find module '' or its corresponding type declarations. ==== tests/cases/compiler/emptyModuleName.ts (1 errors) ==== import * as A from ""; ~~ -!!! error TS2307: Cannot find module ''. +!!! error TS2307: Cannot find module '' or its corresponding type declarations. class B extends A { } \ No newline at end of file diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt index be6bb246c9088..92124b17fae39 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Expor tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,25): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/es5ModuleInternalNamedImports.ts(31,20): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/es5ModuleInternalNamedImports.ts(32,32): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cannot find module 'M3'. +tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cannot find module 'M3' or its corresponding type declarations. ==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (12 errors) ==== @@ -70,5 +70,5 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cann } import M3 from "M3"; ~~~~ -!!! error TS2307: Cannot find module 'M3'. +!!! error TS2307: Cannot find module 'M3' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt index 34a33ccab9708..2ea94f08a103f 100644 --- a/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportIdentifiersParsing.errors.txt @@ -1,16 +1,16 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,10): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2307: Cannot find module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2307: Cannot find module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2307: Cannot find module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,21): error TS2300: Duplicate identifier 'yield'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS1003: Identifier expected. tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS2300: Duplicate identifier 'default'. -tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2307: Cannot find module 'somemodule'. +tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. ==== tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts (13 errors) ==== @@ -18,30 +18,30 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS23 ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. import { yield as default } from "somemodule"; // error to use default as binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. import { default as yield } from "somemodule"; // no error ~~~~~ !!! error TS2300: Duplicate identifier 'yield'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule'. +!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. import { default as default } from "somemodule"; // default as is ok, error of default binding name ~~~~~~~ !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS2300: Duplicate identifier 'default'. ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'somemodule'. \ No newline at end of file +!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt b/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt index d4164e56491f0..fa234f98d868d 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt +++ b/tests/baselines/reference/es6modulekindWithES5Target10.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod'. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. @@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1) ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. namespace N { diff --git a/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt b/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt index 10351e925295c..7251d1d520384 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt +++ b/tests/baselines/reference/es6modulekindWithES5Target9.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod'. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. ==== tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts (5 errors) ==== import d from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. import {a} from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. import * as M from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export {a}; @@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17 export * from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export {b} from "mod" ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export default d; \ No newline at end of file diff --git a/tests/baselines/reference/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.errors.txt b/tests/baselines/reference/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.errors.txt index a31b6647198c5..c74eafe4e35dd 100644 --- a/tests/baselines/reference/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.errors.txt +++ b/tests/baselines/reference/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts(1,42): error TS2307: Cannot find module 'm'. +tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts(1,42): error TS2307: Cannot find module 'm' or its corresponding type declarations. ==== tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts (1 errors) ==== import {default as a, default as b} from "m"; ~~~ -!!! error TS2307: Cannot find module 'm'. +!!! error TS2307: Cannot find module 'm' or its corresponding type declarations. void a; void b; \ No newline at end of file diff --git a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.errors.txt b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.errors.txt index 2634c6ea44161..dcfa66eed6f71 100644 --- a/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.errors.txt +++ b/tests/baselines/reference/esModuleInteropUsesExportStarWhenDefaultPlusNames.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts(1,28): error TS2307: Cannot find module './dep'. +tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts(1,28): error TS2307: Cannot find module './dep' or its corresponding type declarations. ==== tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts (1 errors) ==== import Deps, { var2 } from './dep'; ~~~~~~~ -!!! error TS2307: Cannot find module './dep'. +!!! error TS2307: Cannot find module './dep' or its corresponding type declarations. void Deps; void var2; \ No newline at end of file diff --git a/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt b/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt index 4793bc650addd..00445d9e1a2d1 100644 --- a/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt +++ b/tests/baselines/reference/esnextmodulekindWithES5Target10.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod'. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. @@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.t ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. namespace N { diff --git a/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt b/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt index cccb20f965930..476bad6c5d2f2 100644 --- a/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt +++ b/tests/baselines/reference/esnextmodulekindWithES5Target9.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod'. -tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod'. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations. +tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations. ==== tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts (5 errors) ==== import d from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. import {a} from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. import * as M from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export {a}; @@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts export * from "mod"; ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export {b} from "mod" ~~~~~ -!!! error TS2307: Cannot find module 'mod'. +!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations. export default d; \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt index b39228f100d4b..bc90a5042ba7f 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt +++ b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,12): error TS1324: Dynamic import must have one specifier as an argument. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule'. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations. ==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (5 errors) ==== @@ -24,4 +24,4 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1324: Dynamic import must have one specifier as an argument. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'pathToModule'. \ No newline at end of file +!!! error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index 4bfe02c0467c6..f5e7d238b6a53 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule' or its corresponding type declarations. tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2664: Invalid module name in augmentation, module 'm1' cannot be found. -tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'. +tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule' or its corresponding type declarations. ==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (3 errors) ==== import b = require("externalModule"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'externalModule'. +!!! error TS2307: Cannot find module 'externalModule' or its corresponding type declarations. declare module "m1" { ~~~~ !!! error TS2664: Invalid module name in augmentation, module 'm1' cannot be found. import im2 = require("externalModule"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'externalModule'. +!!! error TS2307: Cannot find module 'externalModule' or its corresponding type declarations. } \ No newline at end of file diff --git a/tests/baselines/reference/importEmptyFromModuleNotExisted.errors.txt b/tests/baselines/reference/importEmptyFromModuleNotExisted.errors.txt index 99ccd49c4895e..b41e4b55fbddc 100644 --- a/tests/baselines/reference/importEmptyFromModuleNotExisted.errors.txt +++ b/tests/baselines/reference/importEmptyFromModuleNotExisted.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts(1,16): error TS2307: Cannot find module 'module-not-existed'. +tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts(1,16): error TS2307: Cannot find module 'module-not-existed' or its corresponding type declarations. ==== tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts (1 errors) ==== import {} from 'module-not-existed' ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'module-not-existed'. +!!! error TS2307: Cannot find module 'module-not-existed' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/importInsideModule.errors.txt b/tests/baselines/reference/importInsideModule.errors.txt index fcf82bd24940f..f43d696989730 100644 --- a/tests/baselines/reference/importInsideModule.errors.txt +++ b/tests/baselines/reference/importInsideModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsideModule_file1'. +tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsideModule_file1' or its corresponding type declarations. ==== tests/cases/compiler/importInsideModule_file2.ts (2 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot fin ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'importInsideModule_file1'. +!!! error TS2307: Cannot find module 'importInsideModule_file1' or its corresponding type declarations. var a = foo.x; } ==== tests/cases/compiler/importInsideModule_file1.ts (0 errors) ==== diff --git a/tests/baselines/reference/importNotElidedWhenNotFound.errors.txt b/tests/baselines/reference/importNotElidedWhenNotFound.errors.txt index b8245c0081d24..7132c52f7851a 100644 --- a/tests/baselines/reference/importNotElidedWhenNotFound.errors.txt +++ b/tests/baselines/reference/importNotElidedWhenNotFound.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/importNotElidedWhenNotFound.ts(1,15): error TS2307: Cannot find module 'file'. -tests/cases/compiler/importNotElidedWhenNotFound.ts(2,15): error TS2307: Cannot find module 'other_file'. -tests/cases/compiler/importNotElidedWhenNotFound.ts(10,16): error TS2307: Cannot find module 'file2'. -tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot find module 'file3'. +tests/cases/compiler/importNotElidedWhenNotFound.ts(1,15): error TS2307: Cannot find module 'file' or its corresponding type declarations. +tests/cases/compiler/importNotElidedWhenNotFound.ts(2,15): error TS2307: Cannot find module 'other_file' or its corresponding type declarations. +tests/cases/compiler/importNotElidedWhenNotFound.ts(10,16): error TS2307: Cannot find module 'file2' or its corresponding type declarations. +tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot find module 'file3' or its corresponding type declarations. ==== tests/cases/compiler/importNotElidedWhenNotFound.ts (4 errors) ==== import X from 'file'; ~~~~~~ -!!! error TS2307: Cannot find module 'file'. +!!! error TS2307: Cannot find module 'file' or its corresponding type declarations. import Z from 'other_file'; ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'other_file'. +!!! error TS2307: Cannot find module 'other_file' or its corresponding type declarations. class Y extends Z { constructor() { @@ -20,10 +20,10 @@ tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot import X2 from 'file2'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file2'. +!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. import X3 from 'file3'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file3'. +!!! error TS2307: Cannot find module 'file3' or its corresponding type declarations. class Q extends Z { constructor() { super(X2, X3); diff --git a/tests/baselines/reference/importTypeAmbientMissing.errors.txt b/tests/baselines/reference/importTypeAmbientMissing.errors.txt index 89beac01c37c0..25c8ffc8762c7 100644 --- a/tests/baselines/reference/importTypeAmbientMissing.errors.txt +++ b/tests/baselines/reference/importTypeAmbientMissing.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS2307: Cannot find module 'fo'. +tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS2307: Cannot find module 'fo' or its corresponding type declarations. ==== tests/cases/conformance/types/import/importTypeAmbientMissing.ts (1 errors) ==== @@ -11,6 +11,6 @@ tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS } const x: import("fo") = { x: 0, y: 0 }; // typo, error ~~~~ -!!! error TS2307: Cannot find module 'fo'. +!!! error TS2307: Cannot find module 'fo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/importTypeLocalMissing.errors.txt b/tests/baselines/reference/importTypeLocalMissing.errors.txt index 7c5081aa99576..d55e85ade7c26 100644 --- a/tests/baselines/reference/importTypeLocalMissing.errors.txt +++ b/tests/baselines/reference/importTypeLocalMissing.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/import/usage.ts(1,24): error TS2307: Cannot find module './fo'. -tests/cases/conformance/types/import/usage.ts(2,22): error TS2307: Cannot find module './fo2'. +tests/cases/conformance/types/import/usage.ts(1,24): error TS2307: Cannot find module './fo' or its corresponding type declarations. +tests/cases/conformance/types/import/usage.ts(2,22): error TS2307: Cannot find module './fo2' or its corresponding type declarations. tests/cases/conformance/types/import/usage.ts(3,36): error TS2694: Namespace '"tests/cases/conformance/types/import/foo2".Bar' has no exported member 'Q'. -tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find module './fo2'. +tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find module './fo2' or its corresponding type declarations. ==== tests/cases/conformance/types/import/foo.ts (0 errors) ==== @@ -35,10 +35,10 @@ tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find ==== tests/cases/conformance/types/import/usage.ts (4 errors) ==== export const x: import("./fo") = { x: 0, y: 0 }; ~~~~~~ -!!! error TS2307: Cannot find module './fo'. +!!! error TS2307: Cannot find module './fo' or its corresponding type declarations. export let y: import("./fo2").Bar.I = { a: "", b: 0 }; ~~~~~~~ -!!! error TS2307: Cannot find module './fo2'. +!!! error TS2307: Cannot find module './fo2' or its corresponding type declarations. export let z: import("./foo2").Bar.Q = { a: "", b: 0 }; ~ !!! error TS2694: Namespace '"tests/cases/conformance/types/import/foo2".Bar' has no exported member 'Q'. @@ -50,7 +50,7 @@ tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find export let shim: typeof import("./fo2") = { ~~~~~~~ -!!! error TS2307: Cannot find module './fo2'. +!!! error TS2307: Cannot find module './fo2' or its corresponding type declarations. Bar: Bar2 }; \ No newline at end of file diff --git a/tests/baselines/reference/importWithTrailingSlash_noResolve.errors.txt b/tests/baselines/reference/importWithTrailingSlash_noResolve.errors.txt index e501cc5d432fc..ee38b96c74be9 100644 --- a/tests/baselines/reference/importWithTrailingSlash_noResolve.errors.txt +++ b/tests/baselines/reference/importWithTrailingSlash_noResolve.errors.txt @@ -1,8 +1,8 @@ -/a.ts(1,17): error TS2307: Cannot find module './foo/'. +/a.ts(1,17): error TS2307: Cannot find module './foo/' or its corresponding type declarations. ==== /a.ts (1 errors) ==== import foo from "./foo/"; ~~~~~~~~ -!!! error TS2307: Cannot find module './foo/'. +!!! error TS2307: Cannot find module './foo/' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt index c536f48763756..634afb2e780ad 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt +++ b/tests/baselines/reference/isolatedModulesImportExportElision.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/file1.ts(1,17): error TS2307: Cannot find module 'module'. -tests/cases/compiler/file1.ts(2,18): error TS2307: Cannot find module 'module'. -tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module 'module'. -tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module'. +tests/cases/compiler/file1.ts(1,17): error TS2307: Cannot find module 'module' or its corresponding type declarations. +tests/cases/compiler/file1.ts(2,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. +tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module 'module' or its corresponding type declarations. +tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. ==== tests/cases/compiler/file1.ts (4 errors) ==== import {c} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module'. +!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. import {c2} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module'. +!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. import * as ns from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module'. +!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. class C extends c2.C { } @@ -23,5 +23,5 @@ tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module'. export {c1} from "module"; ~~~~~~~~ -!!! error TS2307: Cannot find module 'module'. +!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. export var z = x; \ No newline at end of file diff --git a/tests/baselines/reference/literalTypeNameAssertionNotTriggered.errors.txt b/tests/baselines/reference/literalTypeNameAssertionNotTriggered.errors.txt index e7b16c340102b..35c9c1618b1a2 100644 --- a/tests/baselines/reference/literalTypeNameAssertionNotTriggered.errors.txt +++ b/tests/baselines/reference/literalTypeNameAssertionNotTriggered.errors.txt @@ -1,4 +1,4 @@ -/a.ts(1,20): error TS2307: Cannot find module 'something'. +/a.ts(1,20): error TS2307: Cannot find module 'something' or its corresponding type declarations. /b.ts(3,6): error TS2345: Argument of type '""' is not assignable to parameter of type '"x"'. @@ -12,6 +12,6 @@ ==== /a.ts (1 errors) ==== import x = require("something"); ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'something'. +!!! error TS2307: Cannot find module 'something' or its corresponding type declarations. export { x }; \ No newline at end of file diff --git a/tests/baselines/reference/metadataImportType.errors.txt b/tests/baselines/reference/metadataImportType.errors.txt index b7e46cc41d41c..341e722096d64 100644 --- a/tests/baselines/reference/metadataImportType.errors.txt +++ b/tests/baselines/reference/metadataImportType.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/metadataImportType.ts(2,6): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. -tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find module './b'. +tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find module './b' or its corresponding type declarations. ==== tests/cases/compiler/metadataImportType.ts (2 errors) ==== @@ -9,5 +9,5 @@ tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find modu !!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. b: import('./b').B ~~~~~ -!!! error TS2307: Cannot find module './b'. +!!! error TS2307: Cannot find module './b' or its corresponding type declarations. } \ No newline at end of file diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt index cacd821168cd8..af46d49929593 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -tests/cases/compiler/x.ts(17,26): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. tests/cases/compiler/x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -tests/cases/compiler/x.ts(18,21): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. tests/cases/compiler/x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -tests/cases/compiler/x.ts(19,19): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations. tests/cases/compiler/x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -tests/cases/compiler/x.ts(20,21): error TS2307: Cannot find module './x0'. +tests/cases/compiler/x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. tests/cases/compiler/x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations. @@ -33,22 +33,22 @@ tests/cases/compiler/x.ts(24,5): error TS2666: Exports and export assignments ar ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ~~~~~~ -!!! error TS2307: Cannot find module './x0'. +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. import {a} from "./x0"; ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ~~~~~~ -!!! error TS2307: Cannot find module './x0'. +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. export * from "./x0"; ~~~~~~ !!! error TS2666: Exports and export assignments are not permitted in module augmentations. ~~~~~~ -!!! error TS2307: Cannot find module './x0'. +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. export {a} from "./x0"; ~~~~~~ !!! error TS2666: Exports and export assignments are not permitted in module augmentations. ~~~~~~ -!!! error TS2307: Cannot find module './x0'. +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. } declare module "./test" { diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt index a3e41fa38e72a..3c686caad5588 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/f3.ts(3,13): error TS2339: Property 'foo' does not exist on type 'A'. tests/cases/compiler/f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. tests/cases/compiler/f3.ts(12,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/f3.ts(14,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'. @@ -33,12 +33,12 @@ tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ~~~~~~ -!!! error TS2307: Cannot find module './f2'. +!!! error TS2307: Cannot find module './f2' or its corresponding type declarations. export {B} from "./f2"; ~~~~~~ !!! error TS2666: Exports and export assignments are not permitted in module augmentations. ~~~~~~ -!!! error TS2307: Cannot find module './f2'. +!!! error TS2307: Cannot find module './f2' or its corresponding type declarations. import I = N.Ifc; ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt index 3018d72f1b76f..48c8211d55ed8 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'. +tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. tests/cases/compiler/f3.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. @@ -27,7 +27,7 @@ tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in mod ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ~~~~~~ -!!! error TS2307: Cannot find module './f2'. +!!! error TS2307: Cannot find module './f2' or its corresponding type declarations. import I = N.Ifc; ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. diff --git a/tests/baselines/reference/noAssertForUnparseableTypedefs.errors.txt b/tests/baselines/reference/noAssertForUnparseableTypedefs.errors.txt index dde502427dd4d..0b77528c59eba 100644 --- a/tests/baselines/reference/noAssertForUnparseableTypedefs.errors.txt +++ b/tests/baselines/reference/noAssertForUnparseableTypedefs.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/jsdoc/bug26693.js(1,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig. tests/cases/conformance/jsdoc/bug26693.js(1,21): error TS1005: '}' expected. -tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find module 'nope'. +tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find module 'nope' or its corresponding type declarations. ==== tests/cases/conformance/jsdoc/bug26693.js (3 errors) ==== @@ -11,5 +11,5 @@ tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find modul !!! error TS1005: '}' expected. import { nope } from 'nope'; ~~~~~~ -!!! error TS2307: Cannot find module 'nope'. +!!! error TS2307: Cannot find module 'nope' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/packageJsonMain_isNonRecursive.errors.txt b/tests/baselines/reference/packageJsonMain_isNonRecursive.errors.txt index d7e80990bc16d..bf5a281cd1e53 100644 --- a/tests/baselines/reference/packageJsonMain_isNonRecursive.errors.txt +++ b/tests/baselines/reference/packageJsonMain_isNonRecursive.errors.txt @@ -1,10 +1,10 @@ -/a.ts(1,22): error TS2307: Cannot find module 'foo'. +/a.ts(1,22): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /a.ts (1 errors) ==== import foo = require("foo"); ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /node_modules/foo/package.json (0 errors) ==== { "main": "oof" } diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt index 0ebe17354493f..5bbf4b220f7d1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.errors.txt @@ -1,4 +1,4 @@ -/a.ts(1,21): error TS2307: Cannot find module 'foo'. +/a.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== /tsconfig.json (0 errors) ==== @@ -14,5 +14,5 @@ ==== /a.ts (1 errors) ==== import { foo } from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt index 5118c9012e4cb..2724d972987cf 100644 --- a/tests/baselines/reference/privacyGloImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyGloImportParseErrors.errors.txt @@ -2,9 +2,9 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(22,5): error TS2668: 'export tests/cases/compiler/privacyGloImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyGloImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'. +tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations. tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'. +tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations. tests/cases/compiler/privacyGloImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyGloImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyGloImportParseErrors.ts(121,38): error TS1147: Import declarations in a namespace cannot reference a module. @@ -85,7 +85,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm1_M3_public'. +!!! error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -99,7 +99,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor ~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm1_M4_private'. +!!! error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; diff --git a/tests/baselines/reference/privacyImportParseErrors.errors.txt b/tests/baselines/reference/privacyImportParseErrors.errors.txt index b607edf049b44..7a267ec973082 100644 --- a/tests/baselines/reference/privacyImportParseErrors.errors.txt +++ b/tests/baselines/reference/privacyImportParseErrors.errors.txt @@ -2,39 +2,39 @@ tests/cases/compiler/privacyImportParseErrors.ts(22,5): error TS2668: 'export' m tests/cases/compiler/privacyImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'. +tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(106,5): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(106,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(114,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find module 'm2_M3_public'. +tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find module 'm2_M3_public' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS1147: Import declarations in a namespace cannot reference a module. -tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(166,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(167,43): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(180,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2664: Invalid module name in augmentation, module 'glo_M2_public' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(198,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2664: Invalid module name in augmentation, module 'glo_M4_private' cannot be found. -tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public'. -tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private'. -tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public'. -tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. +tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. +tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. +tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(255,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2664: Invalid module name in augmentation, module 'use_glo_M1_public' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(258,45): error TS2709: Cannot use namespace 'use_glo_M1_public' as a type. tests/cases/compiler/privacyImportParseErrors.ts(261,39): error TS2709: Cannot use namespace 'use_glo_M1_public' as a type. -tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public'. +tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(273,38): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(277,45): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2664: Invalid module name in augmentation, module 'use_glo_M3_private' cannot be found. tests/cases/compiler/privacyImportParseErrors.ts(287,46): error TS2709: Cannot use namespace 'use_glo_M3_private' as a type. tests/cases/compiler/privacyImportParseErrors.ts(290,40): error TS2709: Cannot use namespace 'use_glo_M3_private' as a type. -tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private'. +tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. tests/cases/compiler/privacyImportParseErrors.ts(302,38): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(306,45): error TS1147: Import declarations in a namespace cannot reference a module. tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2664: Invalid module name in augmentation, module 'anotherParseError' cannot be found. @@ -124,7 +124,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm1_M3_public'. +!!! error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -138,7 +138,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d ~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm1_M4_private'. +!!! error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; @@ -226,7 +226,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm2_M3_public'. +!!! error TS2307: Cannot find module 'm2_M3_public' or its corresponding type declarations. export var m1_im3_private_v1_public = m1_im3_private.c1; export var m1_im3_private_v2_public = new m1_im3_private.c1(); export var m1_im3_private_v3_public = m1_im3_private.f1; @@ -240,7 +240,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d ~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'm2_M4_private'. +!!! error TS2307: Cannot find module 'm2_M4_private' or its corresponding type declarations. export var m1_im4_private_v1_public = m1_im4_private.c1; export var m1_im4_private_v2_public = new m1_im4_private.c1(); export var m1_im4_private_v3_public = m1_im4_private.f1; @@ -319,7 +319,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import glo_im2_private = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. export var glo_im2_private_v1_public = glo_im2_private.c1; export var glo_im2_private_v2_public = new glo_im2_private.c1(); export var glo_im2_private_v3_public = glo_im2_private.f1; @@ -341,7 +341,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import glo_im4_private = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. export var glo_im4_private_v1_public = glo_im4_private.c1; export var glo_im4_private_v2_public = new glo_im4_private.c1(); export var glo_im4_private_v3_public = glo_im4_private.f1; @@ -356,10 +356,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d export import glo_im2_public = glo_M3_private; export import glo_im3_public = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. export import glo_im4_public = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. export declare module "use_glo_M1_public" { @@ -381,7 +381,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import use_glo_M2_public = require("glo_M2_public"); ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M2_public'. +!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations. export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; }; export var use_glo_M2_public_v2_public: use_glo_M2_public; export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; @@ -422,7 +422,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d import use_glo_M4_private = require("glo_M4_private"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'glo_M4_private'. +!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations. export var use_glo_M4_private_v1_public: { new (): use_glo_M4_private.c1; }; export var use_glo_M4_private_v2_public: use_glo_M4_private; export var use_glo_M4_private_v3_public: () => use_glo_M4_private.c1; diff --git a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt index e9f8842d5cbb5..72835d5511dac 100644 --- a/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/amd/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx'. -decl.ts(2,26): error TS2307: Cannot find module 'baz'. -decl.ts(3,26): error TS2307: Cannot find module './baz'. +decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. +decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations. +decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations. ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.tx"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './foo/bar.tx'. +!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find module 'baz'. +!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations. import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find module './baz'. +!!! error TS2307: Cannot find module './baz' or its corresponding type declarations. //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt index e9f8842d5cbb5..72835d5511dac 100644 --- a/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt +++ b/tests/baselines/reference/project/cantFindTheModule/node/cantFindTheModule.errors.txt @@ -1,18 +1,18 @@ -decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx'. -decl.ts(2,26): error TS2307: Cannot find module 'baz'. -decl.ts(3,26): error TS2307: Cannot find module './baz'. +decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. +decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations. +decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations. ==== decl.ts (3 errors) ==== import modErr = require("./foo/bar.tx"); ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './foo/bar.tx'. +!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations. import modErr1 = require("baz"); ~~~~~ -!!! error TS2307: Cannot find module 'baz'. +!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations. import modErr2 = require("./baz"); ~~~~~~~ -!!! error TS2307: Cannot find module './baz'. +!!! error TS2307: Cannot find module './baz' or its corresponding type declarations. //import modErr1 = require("\bar"); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt index f6ad25fddb1d9..30eeb8a44d2bf 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/amd/emitDecoratorMetadataCommonJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt index f6ad25fddb1d9..30eeb8a44d2bf 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModules/node/emitDecoratorMetadataCommonJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt index f4fe440f379c5..5c605973feaf1 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/amd/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt index f4fe440f379c5..5c605973feaf1 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataCommonJSISolatedModulesNoResolve/node/emitDecoratorMetadataCommonJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt index bd34d2edc4e0e..b5d32ac83951d 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/amd/emitDecoratorMetadataSystemJS.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt index bd34d2edc4e0e..b5d32ac83951d 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJS/node/emitDecoratorMetadataSystemJS.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt index b14b090b83964..a9514189f2165 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/amd/emitDecoratorMetadataSystemJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt index b14b090b83964..a9514189f2165 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModules/node/emitDecoratorMetadataSystemJSISolatedModules.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt index 99fc00df24a34..3852af98200bc 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/amd/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt index 99fc00df24a34..3852af98200bc 100644 --- a/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt +++ b/tests/baselines/reference/project/emitDecoratorMetadataSystemJSISolatedModulesNoResolve/node/emitDecoratorMetadataSystemJSISolatedModulesNoResolve.errors.txt @@ -1,4 +1,4 @@ -main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. +main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. ==== tsconfig.json (0 errors) ==== @@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'. ==== main.ts (1 errors) ==== import * as ng from "angular2/core"; ~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'angular2/core'. +!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations. declare function foo(...args: any[]); diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt index c4ad5e69c83d8..c6d05210818f1 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/amd/intReferencingExtAndInt.errors.txt @@ -1,5 +1,5 @@ internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. -internal2.ts(2,21): error TS2307: Cannot find module 'external2'. +internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations. ==== internal2.ts (2 errors) ==== @@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'external2'. +!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations. export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt index c4ad5e69c83d8..c6d05210818f1 100644 --- a/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt +++ b/tests/baselines/reference/project/intReferencingExtAndInt/node/intReferencingExtAndInt.errors.txt @@ -1,5 +1,5 @@ internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module. -internal2.ts(2,21): error TS2307: Cannot find module 'external2'. +internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations. ==== internal2.ts (2 errors) ==== @@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'external2'. +!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations. export var a = g.square(5); export var b = "foo"; } \ No newline at end of file diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt index a8fb4fc1b2318..6c616694a3d8e 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/amd/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. -test1.ts(3,23): error TS2307: Cannot find module 'test2'. +test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations. ==== test1.ts (2 errors) ==== @@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2'. ~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find module 'test2'. +!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations. //console.log(foo.$); diff --git a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt index a8fb4fc1b2318..6c616694a3d8e 100644 --- a/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt +++ b/tests/baselines/reference/project/nestedLocalModuleWithRecursiveTypecheck/node/nestedLocalModuleWithRecursiveTypecheck.errors.txt @@ -1,5 +1,5 @@ test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module. -test1.ts(3,23): error TS2307: Cannot find module 'test2'. +test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations. ==== test1.ts (2 errors) ==== @@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2'. ~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~ -!!! error TS2307: Cannot find module 'test2'. +!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations. //console.log(foo.$); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index 0ed31c4ea38c1..ada86f611d35c 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,7 +1,7 @@ testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'. +testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. +testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== testGlo.ts (4 errors) ==== @@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt index 0ed31c4ea38c1..ada86f611d35c 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/privacyCheckOnImportedModuleDeclarationsInsideModule.errors.txt @@ -1,7 +1,7 @@ testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'. +testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module. -testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. +testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== testGlo.ts (4 errors) ==== @@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index 126d5b696c1cf..dc26cfdca3fdd 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/amd/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(5,39): error TS2307: Cannot find module 'mExported'. +test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. +test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== test.ts (4 errors) ==== @@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt index 126d5b696c1cf..dc26cfdca3fdd 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule/node/privacyCheckOnImportedModuleDeclarationsInsideNonExportedModule.errors.txt @@ -1,7 +1,7 @@ test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(5,39): error TS2307: Cannot find module 'mExported'. +test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. +test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== test.ts (4 errors) ==== @@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index 872e43a9b4f1d..d45bc062186e5 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/amd/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,7 +1,7 @@ test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(2,39): error TS2307: Cannot find module 'mExported'. +test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. +test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== test.ts (4 errors) ==== @@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. module Internal_M1 { export var c1 = new mExported.me.class1; @@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt index 872e43a9b4f1d..d45bc062186e5 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleImportStatementInParentModule/node/privacyCheckOnImportedModuleImportStatementInParentModule.errors.txt @@ -1,7 +1,7 @@ test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(2,39): error TS2307: Cannot find module 'mExported'. +test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations. test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module. -test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. +test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. ==== test.ts (4 errors) ==== @@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mExported'. +!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations. module Internal_M1 { export var c1 = new mExported.me.class1; @@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'. ~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'mNonExported'. +!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations. module Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { diff --git a/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt b/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt index 228c395cf119a..518063bc9e43f 100644 --- a/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt +++ b/tests/baselines/reference/relativeNamesInClassicResolution.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/somefolder/a.ts(1,17): error TS2307: Cannot find module './b'. +tests/cases/compiler/somefolder/a.ts(1,17): error TS2307: Cannot find module './b' or its corresponding type declarations. ==== tests/cases/compiler/somefolder/a.ts (1 errors) ==== import {x} from "./b" ~~~~~ -!!! error TS2307: Cannot find module './b'. +!!! error TS2307: Cannot find module './b' or its corresponding type declarations. ==== tests/cases/compiler/b.ts (0 errors) ==== export let x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/relativePathMustResolve.errors.txt b/tests/baselines/reference/relativePathMustResolve.errors.txt index 1ff89a74623ca..90b59e8c15b15 100644 --- a/tests/baselines/reference/relativePathMustResolve.errors.txt +++ b/tests/baselines/reference/relativePathMustResolve.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './test/foo'. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './test/foo' or its corresponding type declarations. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require('./test/foo'); ~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './test/foo'. +!!! error TS2307: Cannot find module './test/foo' or its corresponding type declarations. var z = foo.x + 10; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.errors.txt b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.errors.txt index 13660f8b83648..2872d92a2839a 100644 --- a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.errors.txt @@ -1,14 +1,14 @@ -/src/projects/file1.ts(1,20): error TS2307: Cannot find module 'd.json'. -/src/projects/file1.ts(2,20): error TS2307: Cannot find module 'e'. +/src/projects/file1.ts(1,20): error TS2307: Cannot find module 'd.json' or its corresponding type declarations. +/src/projects/file1.ts(2,20): error TS2307: Cannot find module 'e' or its corresponding type declarations. ==== /src/projects/file1.ts (2 errors) ==== import d = require("d.json"); // Should fail ~~~~~~~~ -!!! error TS2307: Cannot find module 'd.json'. +!!! error TS2307: Cannot find module 'd.json' or its corresponding type declarations. import e = require("e"); // Should fail ~~~ -!!! error TS2307: Cannot find module 'e'. +!!! error TS2307: Cannot find module 'e' or its corresponding type declarations. ==== /src/projects/node_modules/b.json (0 errors) ==== { diff --git a/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt b/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt index 2c43e1d530179..258d925a70dfc 100644 --- a/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileWithAmd.errors.txt @@ -1,17 +1,17 @@ error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. -tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b'. -tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module './b.json'. +tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b' or its corresponding type declarations. +tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module './b.json' or its corresponding type declarations. !!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. ==== tests/cases/compiler/file1.ts (2 errors) ==== import b1 = require('./b'); ~~~~~ -!!! error TS2307: Cannot find module './b'. +!!! error TS2307: Cannot find module './b' or its corresponding type declarations. let x = b1.a; import b2 = require('./b.json'); ~~~~~~~~~~ -!!! error TS2307: Cannot find module './b.json'. +!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations. if (x) { let b = b2.b; x = (b1.b === b); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt index 1a92da0939559..1ec53ee17f956 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.errors.txt @@ -1,6 +1,6 @@ error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. tests/cases/compiler/file1.ts(1,1): error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'. -tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json'. +tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json' or its corresponding type declarations. !!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy. @@ -9,7 +9,7 @@ tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'. ~~~~~~~~~~ -!!! error TS2307: Cannot find module './b.json'. +!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations. ==== tests/cases/compiler/b.json (0 errors) ==== { diff --git a/tests/baselines/reference/requireOfJsonFileWithoutExtension.errors.txt b/tests/baselines/reference/requireOfJsonFileWithoutExtension.errors.txt index 799b78c26eec8..a2ceaa0fa4cdf 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutExtension.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileWithoutExtension.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b'. +tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b' or its corresponding type declarations. ==== tests/cases/compiler/file1.ts (1 errors) ==== import b1 = require('./b'); // This should not resolve ~~~~~ -!!! error TS2307: Cannot find module './b'. +!!! error TS2307: Cannot find module './b' or its corresponding type declarations. let x = b1.a; import b2 = require('./b.json'); if (x) { diff --git a/tests/baselines/reference/shorthand-property-es5-es6.errors.txt b/tests/baselines/reference/shorthand-property-es5-es6.errors.txt index 650263a08c4e4..31b5eeaadf5e6 100644 --- a/tests/baselines/reference/shorthand-property-es5-es6.errors.txt +++ b/tests/baselines/reference/shorthand-property-es5-es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'. +tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/shorthand-property-es6-amd.errors.txt b/tests/baselines/reference/shorthand-property-es6-amd.errors.txt index 650263a08c4e4..31b5eeaadf5e6 100644 --- a/tests/baselines/reference/shorthand-property-es6-amd.errors.txt +++ b/tests/baselines/reference/shorthand-property-es6-amd.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'. +tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/shorthand-property-es6-es6.errors.txt b/tests/baselines/reference/shorthand-property-es6-es6.errors.txt index 650263a08c4e4..31b5eeaadf5e6 100644 --- a/tests/baselines/reference/shorthand-property-es6-es6.errors.txt +++ b/tests/baselines/reference/shorthand-property-es6-es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'. +tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations. ==== tests/cases/compiler/test.ts (1 errors) ==== import {foo} from './foo'; ~~~~~~~ -!!! error TS2307: Cannot find module './foo'. +!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. const baz = 42; const bar = { foo, baz }; \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt index 22522208ea890..ada28aac1e62d 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentInES6Module.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule'. +tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule' or its corresponding type declarations. ==== tests/cases/compiler/existingModule.ts (0 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingM import {x} from './existingModule'; import {foo} from './missingModule'; ~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module './missingModule'. +!!! error TS2307: Cannot find module './missingModule' or its corresponding type declarations. declare function use(a: any): void; diff --git a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt index bde4ec862bd35..cf8455e93a5c1 100644 --- a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,8): error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): error TS2307: Cannot find module '1'. +tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): error TS2307: Cannot find module '1' or its corresponding type declarations. ==== tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts (2 errors) ==== @@ -8,4 +8,4 @@ tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): er ~~~~~~ !!! error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~ -!!! error TS2307: Cannot find module '1'. \ No newline at end of file +!!! error TS2307: Cannot find module '1' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt index b6e20cfc188ae..351de7cf7e356 100644 --- a/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeWordInImportDeclaration.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,13): error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1' or its corresponding type declarations. tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,16): error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1' or its corresponding type declarations. tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,8): error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. -tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1'. +tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1' or its corresponding type declarations. ==== tests/cases/compiler/strictModeWordInImportDeclaration.ts (6 errors) ==== @@ -12,14 +12,14 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: C ~~~~~~~ !!! error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1'. +!!! error TS2307: Cannot find module './1' or its corresponding type declarations. import {foo as private} from "./1" ~~~~~~~ !!! error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1'. +!!! error TS2307: Cannot find module './1' or its corresponding type declarations. import public from "./1" ~~~~~~ !!! error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode. ~~~~~ -!!! error TS2307: Cannot find module './1'. \ No newline at end of file +!!! error TS2307: Cannot find module './1' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/systemModule10.errors.txt b/tests/baselines/reference/systemModule10.errors.txt index e1548b30f9087..539f17784587e 100644 --- a/tests/baselines/reference/systemModule10.errors.txt +++ b/tests/baselines/reference/systemModule10.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/systemModule10.ts(1,20): error TS2307: Cannot find module 'file1'. -tests/cases/compiler/systemModule10.ts(2,21): error TS2307: Cannot find module 'file2'. +tests/cases/compiler/systemModule10.ts(1,20): error TS2307: Cannot find module 'file1' or its corresponding type declarations. +tests/cases/compiler/systemModule10.ts(2,21): error TS2307: Cannot find module 'file2' or its corresponding type declarations. ==== tests/cases/compiler/systemModule10.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1'. +!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file2'. +!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule10_ES5.errors.txt b/tests/baselines/reference/systemModule10_ES5.errors.txt index 4a22dba31cde4..5e5e47ddbbe4a 100644 --- a/tests/baselines/reference/systemModule10_ES5.errors.txt +++ b/tests/baselines/reference/systemModule10_ES5.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/systemModule10_ES5.ts(1,20): error TS2307: Cannot find module 'file1'. -tests/cases/compiler/systemModule10_ES5.ts(2,21): error TS2307: Cannot find module 'file2'. +tests/cases/compiler/systemModule10_ES5.ts(1,20): error TS2307: Cannot find module 'file1' or its corresponding type declarations. +tests/cases/compiler/systemModule10_ES5.ts(2,21): error TS2307: Cannot find module 'file2' or its corresponding type declarations. ==== tests/cases/compiler/systemModule10_ES5.ts (2 errors) ==== import n, {x} from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1'. +!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. import n2 = require('file2'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file2'. +!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. export {x} export {x as y} export {n} diff --git a/tests/baselines/reference/systemModule11.errors.txt b/tests/baselines/reference/systemModule11.errors.txt index 46a47cc9a938a..649b764bfcc35 100644 --- a/tests/baselines/reference/systemModule11.errors.txt +++ b/tests/baselines/reference/systemModule11.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/file1.ts(6,15): error TS2307: Cannot find module 'bar'. -tests/cases/compiler/file2.ts(6,15): error TS2307: Cannot find module 'bar'. -tests/cases/compiler/file3.ts(1,25): error TS2307: Cannot find module 'a'. -tests/cases/compiler/file3.ts(3,15): error TS2307: Cannot find module 'bar'. -tests/cases/compiler/file4.ts(8,27): error TS2307: Cannot find module 'a'. -tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a'. +tests/cases/compiler/file1.ts(6,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/file2.ts(6,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/file3.ts(1,25): error TS2307: Cannot find module 'a' or its corresponding type declarations. +tests/cases/compiler/file3.ts(3,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/file4.ts(8,27): error TS2307: Cannot find module 'a' or its corresponding type declarations. +tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a' or its corresponding type declarations. ==== tests/cases/compiler/file1.ts (1 errors) ==== @@ -14,7 +14,7 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a'. export function foo() {} export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. ==== tests/cases/compiler/file2.ts (1 errors) ==== var x; @@ -24,16 +24,16 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a'. export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. ==== tests/cases/compiler/file3.ts (2 errors) ==== export {x, y as z} from 'a'; ~~~ -!!! error TS2307: Cannot find module 'a'. +!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. export default function foo() {} export * from 'bar'; ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. ==== tests/cases/compiler/file4.ts (1 errors) ==== export var x; @@ -45,10 +45,10 @@ tests/cases/compiler/file5.ts(2,15): error TS2307: Cannot find module 'a'. export {s, s1 as s2} from 'a' ~~~ -!!! error TS2307: Cannot find module 'a'. +!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. ==== tests/cases/compiler/file5.ts (1 errors) ==== function foo() {} export * from 'a'; ~~~ -!!! error TS2307: Cannot find module 'a'. \ No newline at end of file +!!! error TS2307: Cannot find module 'a' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/systemModule12.errors.txt b/tests/baselines/reference/systemModule12.errors.txt index 57de4e1f9a5c9..0563f37b16acb 100644 --- a/tests/baselines/reference/systemModule12.errors.txt +++ b/tests/baselines/reference/systemModule12.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/systemModule12.ts(2,15): error TS2307: Cannot find module 'file1'. +tests/cases/compiler/systemModule12.ts(2,15): error TS2307: Cannot find module 'file1' or its corresponding type declarations. ==== tests/cases/compiler/systemModule12.ts (1 errors) ==== /// import n from 'file1' ~~~~~~~ -!!! error TS2307: Cannot find module 'file1'. +!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/systemModule14.errors.txt b/tests/baselines/reference/systemModule14.errors.txt index a1555fdab321b..8b6c0852f27ac 100644 --- a/tests/baselines/reference/systemModule14.errors.txt +++ b/tests/baselines/reference/systemModule14.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/systemModule14.ts(5,17): error TS2307: Cannot find module 'foo'. +tests/cases/compiler/systemModule14.ts(5,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. ==== tests/cases/compiler/systemModule14.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/systemModule14.ts(5,17): error TS2307: Cannot find module ' import {a} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. export {foo} var x = 1; diff --git a/tests/baselines/reference/systemModule16.errors.txt b/tests/baselines/reference/systemModule16.errors.txt index 6e65f7e31a1e1..6f5bf93daacb9 100644 --- a/tests/baselines/reference/systemModule16.errors.txt +++ b/tests/baselines/reference/systemModule16.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/systemModule16.ts(1,20): error TS2307: Cannot find module 'foo'. -tests/cases/compiler/systemModule16.ts(2,20): error TS2307: Cannot find module 'bar'. -tests/cases/compiler/systemModule16.ts(3,15): error TS2307: Cannot find module 'foo'. -tests/cases/compiler/systemModule16.ts(4,15): error TS2307: Cannot find module 'bar'. -tests/cases/compiler/systemModule16.ts(7,32): error TS2307: Cannot find module 'foo'. -tests/cases/compiler/systemModule16.ts(8,32): error TS2307: Cannot find module 'bar'. +tests/cases/compiler/systemModule16.ts(1,20): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(2,20): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(3,15): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(4,15): error TS2307: Cannot find module 'bar' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(7,32): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/systemModule16.ts(8,32): error TS2307: Cannot find module 'bar' or its corresponding type declarations. tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma operator is unused and has no side effects. @@ -13,24 +13,24 @@ tests/cases/compiler/systemModule16.ts(10,1): error TS2695: Left side of comma o ==== tests/cases/compiler/systemModule16.ts (10 errors) ==== import * as x from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. import * as y from "bar"; ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. export * from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. export * from "bar" ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. export {x} export {y} import {a1, b1, c1 as d1} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo'. +!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. export {a2, b2, c2 as d2} from "bar"; ~~~~~ -!!! error TS2307: Cannot find module 'bar'. +!!! error TS2307: Cannot find module 'bar' or its corresponding type declarations. x,y,a1,b1,d1; ~ diff --git a/tests/baselines/reference/systemModule9.errors.txt b/tests/baselines/reference/systemModule9.errors.txt index bedcc561058f2..c38c85b1798c1 100644 --- a/tests/baselines/reference/systemModule9.errors.txt +++ b/tests/baselines/reference/systemModule9.errors.txt @@ -1,28 +1,28 @@ -tests/cases/compiler/systemModule9.ts(1,21): error TS2307: Cannot find module 'file1'. -tests/cases/compiler/systemModule9.ts(2,25): error TS2307: Cannot find module 'file2'. -tests/cases/compiler/systemModule9.ts(3,15): error TS2307: Cannot find module 'file3'. -tests/cases/compiler/systemModule9.ts(5,25): error TS2307: Cannot find module 'file5'. -tests/cases/compiler/systemModule9.ts(6,22): error TS2307: Cannot find module 'file6'. -tests/cases/compiler/systemModule9.ts(16,15): error TS2307: Cannot find module 'file7'. +tests/cases/compiler/systemModule9.ts(1,21): error TS2307: Cannot find module 'file1' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(2,25): error TS2307: Cannot find module 'file2' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(3,15): error TS2307: Cannot find module 'file3' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(5,25): error TS2307: Cannot find module 'file5' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(6,22): error TS2307: Cannot find module 'file6' or its corresponding type declarations. +tests/cases/compiler/systemModule9.ts(16,15): error TS2307: Cannot find module 'file7' or its corresponding type declarations. ==== tests/cases/compiler/systemModule9.ts (6 errors) ==== import * as ns from 'file1'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file1'. +!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations. import {a, b as c} from 'file2'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file2'. +!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations. import d from 'file3' ~~~~~~~ -!!! error TS2307: Cannot find module 'file3'. +!!! error TS2307: Cannot find module 'file3' or its corresponding type declarations. import 'file4' import e, * as ns2 from 'file5'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file5'. +!!! error TS2307: Cannot find module 'file5' or its corresponding type declarations. import ns3 = require('file6'); ~~~~~~~ -!!! error TS2307: Cannot find module 'file6'. +!!! error TS2307: Cannot find module 'file6' or its corresponding type declarations. ns.f(); a(); @@ -34,7 +34,7 @@ tests/cases/compiler/systemModule9.ts(16,15): error TS2307: Cannot find module ' export * from 'file7'; ~~~~~~~ -!!! error TS2307: Cannot find module 'file7'. +!!! error TS2307: Cannot find module 'file7' or its corresponding type declarations. var x, y = true; export {x}; diff --git a/tests/baselines/reference/topLevelFileModuleMissing.errors.txt b/tests/baselines/reference/topLevelFileModuleMissing.errors.txt index 7642bfd86a2ab..e440eb76253d7 100644 --- a/tests/baselines/reference/topLevelFileModuleMissing.errors.txt +++ b/tests/baselines/reference/topLevelFileModuleMissing.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module 'vs/foo'. +tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module 'vs/foo' or its corresponding type declarations. ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("vs/foo"); ~~~~~~~~ -!!! error TS2307: Cannot find module 'vs/foo'. +!!! error TS2307: Cannot find module 'vs/foo' or its corresponding type declarations. var z = foo.x + 10; ==== tests/cases/conformance/externalModules/vs/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/tsxNoTypeAnnotatedSFC.errors.txt b/tests/baselines/reference/tsxNoTypeAnnotatedSFC.errors.txt index 6415843f8a06a..f4f7757af843f 100644 --- a/tests/baselines/reference/tsxNoTypeAnnotatedSFC.errors.txt +++ b/tests/baselines/reference/tsxNoTypeAnnotatedSFC.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/tsxNoTypeAnnotatedSFC.tsx(2,24): error TS2307: Cannot find module 'react'. +tests/cases/compiler/tsxNoTypeAnnotatedSFC.tsx(2,24): error TS2307: Cannot find module 'react' or its corresponding type declarations. ==== tests/cases/compiler/tsxNoTypeAnnotatedSFC.tsx (1 errors) ==== // not _actually_ making react available in this test to regression test #22948 import * as React from 'react'; ~~~~~~~ -!!! error TS2307: Cannot find module 'react'. +!!! error TS2307: Cannot find module 'react' or its corresponding type declarations. const Test123 = () =>
; diff --git a/tests/baselines/reference/umdDependencyComment2.errors.txt b/tests/baselines/reference/umdDependencyComment2.errors.txt index 316bac0576ce8..417454b1323af 100644 --- a/tests/baselines/reference/umdDependencyComment2.errors.txt +++ b/tests/baselines/reference/umdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/umdDependencyComment2.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyComment2.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName1.errors.txt b/tests/baselines/reference/umdDependencyCommentName1.errors.txt index 197753127d1bd..c6e9c622a58b8 100644 --- a/tests/baselines/reference/umdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/umdDependencyCommentName1.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/umdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/umdDependencyCommentName2.errors.txt b/tests/baselines/reference/umdDependencyCommentName2.errors.txt index d8920aed91b8b..1777dee81a502 100644 --- a/tests/baselines/reference/umdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/umdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot find module 'm2'. +tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. ==== tests/cases/compiler/umdDependencyCommentName2.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/umdDependencyCommentName2.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2'. +!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredModuleError.errors.txt b/tests/baselines/reference/undeclaredModuleError.errors.txt index 4a8248bfd6c96..5da647575fcce 100644 --- a/tests/baselines/reference/undeclaredModuleError.errors.txt +++ b/tests/baselines/reference/undeclaredModuleError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs'. +tests/cases/compiler/undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. tests/cases/compiler/undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: any, name: string) => boolean'. Type 'void' is not assignable to type 'boolean'. tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. @@ -7,7 +7,7 @@ tests/cases/compiler/undeclaredModuleError.ts(11,41): error TS2304: Cannot find ==== tests/cases/compiler/undeclaredModuleError.ts (3 errors) ==== import fs = require('fs'); ~~~~ -!!! error TS2307: Cannot find module 'fs'. +!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} function join(...paths: string[]) {} diff --git a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt index d524c717980a2..7a600c1bc0b61 100644 --- a/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt +++ b/tests/baselines/reference/unusedInvalidTypeArguments.errors.txt @@ -1,11 +1,11 @@ -/call.ts(1,21): error TS2307: Cannot find module 'unknown'. +/call.ts(1,21): error TS2307: Cannot find module 'unknown' or its corresponding type declarations. /callAny.ts(3,1): error TS2347: Untyped function calls may not accept type arguments. /callAny.ts(4,1): error TS2347: Untyped function calls may not accept type arguments. /callAny.ts(4,3): error TS2304: Cannot find name 'InvalidReference'. /classReference.ts(4,24): error TS2315: Type 'C' is not generic. -/interface.ts(1,21): error TS2307: Cannot find module 'unknown'. -/new.ts(1,21): error TS2307: Cannot find module 'unkown'. -/super.ts(1,22): error TS2307: Cannot find module 'unknown'. +/interface.ts(1,21): error TS2307: Cannot find module 'unknown' or its corresponding type declarations. +/new.ts(1,21): error TS2307: Cannot find module 'unkown' or its corresponding type declarations. +/super.ts(1,22): error TS2307: Cannot find module 'unknown' or its corresponding type declarations. /super.ts(8,17): error TS2304: Cannot find name 'InvalidReference'. /typeReference.ts(6,17): error TS2315: Type 'U' is not generic. @@ -31,20 +31,20 @@ ==== /interface.ts (1 errors) ==== import { Foo } from "unknown"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'unknown'. +!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations. export interface I { x: Foo; } ==== /call.ts (1 errors) ==== import { foo } from "unknown"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'unknown'. +!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations. type T = number; foo(); ==== /new.ts (1 errors) ==== import { Foo } from "unkown"; ~~~~~~~~ -!!! error TS2307: Cannot find module 'unkown'. +!!! error TS2307: Cannot find module 'unkown' or its corresponding type declarations. type T = number; new Foo(); @@ -63,7 +63,7 @@ ==== /super.ts (2 errors) ==== import { A, B } from "unknown"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'unknown'. +!!! error TS2307: Cannot find module 'unknown' or its corresponding type declarations. type T = number; diff --git a/tests/baselines/reference/user/acorn.log b/tests/baselines/reference/user/acorn.log index 75c36a98697da..b14b7e6c2b32b 100644 --- a/tests/baselines/reference/user/acorn.log +++ b/tests/baselines/reference/user/acorn.log @@ -5,7 +5,7 @@ node_modules/acorn/bin/_acorn.js(59,59): error TS2345: Argument of type '2 | nul Type 'null' is not assignable to type 'string | number | undefined'. node_modules/acorn/bin/_acorn.js(63,23): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. -node_modules/acorn/bin/run_test262.js(3,21): error TS2307: Cannot find module 'test262-parser-runner'. +node_modules/acorn/bin/run_test262.js(3,21): error TS2307: Cannot find module 'test262-parser-runner' or its corresponding type declarations. node_modules/acorn/dist/acorn.es.js(36,1): error TS2322: Type 'null' is not assignable to type 'string'. node_modules/acorn/dist/acorn.es.js(36,32): error TS2322: Type 'null' is not assignable to type 'string'. node_modules/acorn/dist/acorn.es.js(410,56): error TS2339: Property 'push' does not exist on type '(token: any) => any'. diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index ca5bc8a93adcf..d71e2e2ca451b 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -1,20 +1,20 @@ Exit Code: 1 Standard output: node_modules/adonis-framework/lib/util.js(24,13): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/providers/ConfigProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/EncryptionProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/EnvProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/EventProvider.js(12,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/HashProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/HelpersProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/MiddlewareProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/RequestProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/ResponseProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/RouteProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/ServerProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/SessionProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/StaticProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. -node_modules/adonis-framework/providers/ViewProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/providers/ConfigProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/EncryptionProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/EnvProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/EventProvider.js(12,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/HashProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/HelpersProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/MiddlewareProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/RequestProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/ResponseProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/RouteProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/ServerProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/SessionProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/StaticProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. +node_modules/adonis-framework/providers/ViewProvider.js(9,33): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/Config/index.js(37,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Config/index.js(39,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Config/index.js(58,15): error TS2304: Cannot find name 'Mixed'. @@ -34,7 +34,7 @@ node_modules/adonis-framework/src/Encryption/index.js(223,15): error TS2304: Can node_modules/adonis-framework/src/Env/index.js(54,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Env/index.js(56,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Env/index.js(80,15): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/src/Event/index.js(13,21): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/src/Event/index.js(13,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/Event/index.js(128,12): error TS2740: Type '() => {}[]' is missing the following properties from type 'any[]': pop, push, concat, join, and 27 more. node_modules/adonis-framework/src/Event/index.js(153,25): error TS2339: Property 'wildcard' does not exist on type 'EventEmitter2'. node_modules/adonis-framework/src/Event/index.js(188,17): error TS2304: Cannot find name 'Spread'. @@ -79,7 +79,7 @@ node_modules/adonis-framework/src/Helpers/index.js(240,45): error TS2345: Argume node_modules/adonis-framework/src/Helpers/index.js(256,45): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. node_modules/adonis-framework/src/Helpers/index.js(330,23): error TS2532: Object is possibly 'undefined'. -node_modules/adonis-framework/src/Middleware/index.js(13,21): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/src/Middleware/index.js(13,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/Middleware/index.js(230,20): error TS8024: JSDoc '@param' tag has name 'Middleware', but there is no parameter with that name. node_modules/adonis-framework/src/Request/index.js(64,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Request/index.js(66,15): error TS2304: Cannot find name 'Mixed'. @@ -157,7 +157,7 @@ node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argum node_modules/adonis-framework/src/Route/resource.js(296,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Route/resource.js(314,62): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Server/helpers.js(17,29): error TS8024: JSDoc '@param' tag has name 'appNamespace', but there is no parameter with that name. -node_modules/adonis-framework/src/Server/index.js(17,21): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/src/Server/index.js(17,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/Server/index.js(54,21): error TS2554: Expected 4 arguments, but got 3. node_modules/adonis-framework/src/Server/index.js(137,25): error TS8024: JSDoc '@param' tag has name 'handlers', but there is no parameter with that name. node_modules/adonis-framework/src/Server/index.js(252,15): error TS2304: Cannot find name 'instance'. @@ -173,7 +173,7 @@ node_modules/adonis-framework/src/Session/Drivers/File/index.js(79,15): error TS node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(23,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(59,15): error TS2322: Type 'IterableIterator' is not assignable to type 'boolean'. node_modules/adonis-framework/src/Session/Drivers/Redis/index.js(72,15): error TS2322: Type 'IterableIterator' is not assignable to type 'boolean'. -node_modules/adonis-framework/src/Session/SessionManager.js(13,21): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/src/Session/SessionManager.js(13,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/Session/SessionManager.js(69,22): error TS2339: Property 'drivers' does not exist on type 'Function'. node_modules/adonis-framework/src/Session/SessionManager.js(69,49): error TS2339: Property 'drivers' does not exist on type 'Function'. node_modules/adonis-framework/src/Session/SessionManager.js(71,76): error TS2339: Property 'drivers' does not exist on type 'Function'. @@ -217,7 +217,7 @@ node_modules/adonis-framework/src/View/Form/index.js(601,51): error TS2345: Argu Type 'number' is not assignable to type 'string | any[]'. node_modules/adonis-framework/src/View/index.js(50,23): error TS8024: JSDoc '@param' tag has name 'template_path', but there is no parameter with that name. node_modules/adonis-framework/src/View/index.js(113,15): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/src/View/services.js(10,21): error TS2307: Cannot find module 'adonis-fold'. +node_modules/adonis-framework/src/View/services.js(10,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations. node_modules/adonis-framework/src/View/services.js(25,23): error TS8024: JSDoc '@param' tag has name 'lexer', but there is no parameter with that name. node_modules/adonis-framework/src/View/services.js(34,22): error TS2339: Property 'CallExtensionAsync' does not exist on type 'Function'. diff --git a/tests/baselines/reference/user/bcryptjs.log b/tests/baselines/reference/user/bcryptjs.log index 109b69d7586a4..88f3143c06668 100644 --- a/tests/baselines/reference/user/bcryptjs.log +++ b/tests/baselines/reference/user/bcryptjs.log @@ -1,6 +1,6 @@ Exit Code: 1 Standard output: -node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript'. +node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript' or its corresponding type declarations. node_modules/bcryptjs/scripts/build.js(32,1): error TS2741: Property 'ISAAC' is missing in type '{ VERSION: any; }' but required in type '{ VERSION: any; ISAAC: boolean; }'. node_modules/bcryptjs/src/bcrypt/impl.js(516,22): error TS2345: Argument of type 'Int32List' is not assignable to parameter of type 'number[]'. Type 'Int32Array' is missing the following properties from type 'number[]': pop, push, concat, shift, and 5 more. @@ -29,7 +29,7 @@ node_modules/bcryptjs/src/wrap.js(37,26): error TS2304: Cannot find name 'define node_modules/bcryptjs/src/wrap.js(37,51): error TS2304: Cannot find name 'define'. node_modules/bcryptjs/src/wrap.js(38,9): error TS2304: Cannot find name 'define'. node_modules/bcryptjs/src/wrap.js(49,12): error TS2552: Cannot find name 'bcrypt'. Did you mean 'Crypto'? -node_modules/bcryptjs/tests/suite.js(3,23): error TS2307: Cannot find module 'bcrypt'. +node_modules/bcryptjs/tests/suite.js(3,23): error TS2307: Cannot find module 'bcrypt' or its corresponding type declarations. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index d15977ac947e4..9e39c5c600184 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -3350,11 +3350,11 @@ node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(216,19): node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(239,45): error TS2694: Namespace 'Changes.ChangesView' has no exported member 'Row'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(270,38): error TS2694: Namespace 'Changes.ChangesView' has no exported member 'Row'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(314,21): error TS2339: Property 'Row' does not exist on type 'typeof ChangesView'. -node_modules/chrome-devtools-frontend/front_end/cm/activeline.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/activeline.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/activeline.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/activeline.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/activeline.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm/closebrackets.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/closebrackets.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/closebrackets.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/closebrackets.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/closebrackets.js(8,5): error TS2304: Cannot find name 'define'. @@ -3476,25 +3476,25 @@ node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(9372,12): error node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(9446,9): error TS2339: Property 'contextMenuPending' does not exist on type 'TextareaInput'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(9467,11): error TS2339: Property 'contextMenuPending' does not exist on type 'TextareaInput'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(9527,40): error TS2339: Property 'getValue' does not exist on type 'CodeMirror$1'. -node_modules/chrome-devtools-frontend/front_end/cm/comment.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/comment.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/comment.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(12,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(12,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(13,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(13,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(14,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(8,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(13,15): error TS2551: Property 'documentMode' does not exist on type 'Document'. Did you mean 'DOCUMENT_NODE'? node_modules/chrome-devtools-frontend/front_end/cm/matchbrackets.js(13,48): error TS2551: Property 'documentMode' does not exist on type 'Document'. Did you mean 'DOCUMENT_NODE'? -node_modules/chrome-devtools-frontend/front_end/cm/multiplex.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/multiplex.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/multiplex.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/multiplex.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/multiplex.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(15,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(15,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(16,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(16,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(17,5): error TS2304: Cannot find name 'define'. @@ -3513,76 +3513,76 @@ node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.j node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(154,13): error TS1345: An expression of type 'void' cannot be tested for truthiness node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(155,24): error TS2339: Property 'token' does not exist on type 'void'. node_modules/chrome-devtools-frontend/front_end/cm_modes/DefaultCodeMirrorMimeMode.js(22,14): error TS2339: Property 'eval' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/clike.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/clike.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/clike.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/clike.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/clike.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/clojure.js(11,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/clojure.js(11,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/clojure.js(12,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/clojure.js(12,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/clojure.js(13,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(10,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(10,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(11,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(11,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(12,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(41,3): error TS2740: Type 'RegExp' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more. node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(282,24): error TS2339: Property 'exec' does not exist on type 'string[]'. node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,5): error TS2554: Expected 0-1 arguments, but got 3. -node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,50): error TS2307: Cannot find module '../xml/xml'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,73): error TS2307: Cannot find module '../javascript/javascript'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,50): error TS2307: Cannot find module '../xml/xml' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,73): error TS2307: Cannot find module '../javascript/javascript' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(11,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(11,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(12,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(12,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(13,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,5): error TS2554: Expected 0-1 arguments, but got 3. -node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,85): error TS2307: Cannot find module '../clike/clike'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,85): error TS2307: Cannot find module '../clike/clike' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(8,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(172,15): error TS2403: Subsequent variable declarations must have the same type. Variable 'style' must be of type 'string', but here has type 'any'. node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(174,15): error TS2403: Subsequent variable declarations must have the same type. Variable 'style' must be of type 'string', but here has type 'any'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/python.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/python.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/python.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/python.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/python.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/shell.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/shell.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/shell.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/shell.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/shell.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_modes/stylus.js(8,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_modes/stylus.js(8,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_modes/stylus.js(9,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/stylus.js(9,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_modes/stylus.js(10,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(8,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,5): error TS2554: Expected 0-1 arguments, but got 3. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(7,17): error TS2307: Cannot find module '../../addon/mode/multiplex'. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(7,17): error TS2307: Cannot find module '../../addon/mode/multiplex' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(8,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(8,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(9,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,5): error TS2554: Expected 0-1 arguments, but got 4. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,50): error TS2307: Cannot find module '../xml/xml'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,73): error TS2307: Cannot find module '../javascript/javascript'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,110): error TS2307: Cannot find module '../css/css'. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,50): error TS2307: Cannot find module '../xml/xml' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,73): error TS2307: Cannot find module '../javascript/javascript' or its corresponding type declarations. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,110): error TS2307: Cannot find module '../css/css' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/javascript.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/javascript.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/javascript.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/javascript.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/javascript.js(8,5): error TS2304: Cannot find name 'define'. -node_modules/chrome-devtools-frontend/front_end/cm_web_modes/xml.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. +node_modules/chrome-devtools-frontend/front_end/cm_web_modes/xml.js(6,17): error TS2307: Cannot find module '../../lib/codemirror' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/xml.js(7,19): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/xml.js(7,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_web_modes/xml.js(8,5): error TS2304: Cannot find name 'define'. @@ -11612,7 +11612,7 @@ node_modules/chrome-devtools-frontend/front_end/terminal/TerminalWidget.js(29,54 node_modules/chrome-devtools-frontend/front_end/terminal/TerminalWidget.js(30,65): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/terminal/TerminalWidget.js(139,9): error TS2322: Type 'Node' is not assignable to type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/terminal/TerminalWidget.js(146,7): error TS2322: Type 'Node' is not assignable to type 'ChildNode'. -node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit.js(19,34): error TS2307: Cannot find module '../../xterm'. +node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit.js(19,34): error TS2307: Cannot find module '../../xterm' or its corresponding type declarations. node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit.js(20,21): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit.js(24,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit.js(29,16): error TS2339: Property 'Terminal' does not exist on type 'Window'. diff --git a/tests/baselines/reference/user/create-react-app.log b/tests/baselines/reference/user/create-react-app.log index 275a3140def8d..a9cf2eca4fa33 100644 --- a/tests/baselines/reference/user/create-react-app.log +++ b/tests/baselines/reference/user/create-react-app.log @@ -1,40 +1,40 @@ Exit Code: 1 Standard output: -packages/babel-preset-react-app/dependencies.js(38,17): error TS2307: Cannot find module '@babel/preset-env'. -packages/babel-preset-react-app/dependencies.js(49,17): error TS2307: Cannot find module '@babel/preset-env'. -packages/babel-preset-react-app/index.js(52,17): error TS2307: Cannot find module '@babel/preset-env'. -packages/babel-preset-react-app/index.js(61,17): error TS2307: Cannot find module '@babel/preset-env'. -packages/babel-preset-react-app/index.js(74,17): error TS2307: Cannot find module '@babel/preset-react'. -packages/babel-preset-react-app/index.js(84,33): error TS2307: Cannot find module '@babel/preset-flow'. -packages/babel-preset-react-app/index.js(89,15): error TS2307: Cannot find module 'babel-plugin-macros'. -packages/babel-preset-react-app/index.js(93,15): error TS2307: Cannot find module '@babel/plugin-transform-destructuring'. -packages/babel-preset-react-app/index.js(98,17): error TS2307: Cannot find module '@babel/plugin-proposal-class-properties'. -packages/babel-preset-react-app/index.js(107,17): error TS2307: Cannot find module '@babel/plugin-proposal-object-rest-spread'. -packages/babel-preset-react-app/index.js(114,17): error TS2307: Cannot find module '@babel/plugin-transform-runtime'. -packages/babel-preset-react-app/index.js(123,17): error TS2307: Cannot find module 'babel-plugin-transform-react-remove-prop-types'. -packages/babel-preset-react-app/index.js(130,17): error TS2307: Cannot find module '@babel/plugin-transform-regenerator'. -packages/babel-preset-react-app/index.js(137,15): error TS2307: Cannot find module '@babel/plugin-syntax-dynamic-import'. -packages/babel-preset-react-app/index.js(140,17): error TS2307: Cannot find module 'babel-plugin-transform-dynamic-import'. +packages/babel-preset-react-app/dependencies.js(38,17): error TS2307: Cannot find module '@babel/preset-env' or its corresponding type declarations. +packages/babel-preset-react-app/dependencies.js(49,17): error TS2307: Cannot find module '@babel/preset-env' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(52,17): error TS2307: Cannot find module '@babel/preset-env' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(61,17): error TS2307: Cannot find module '@babel/preset-env' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(74,17): error TS2307: Cannot find module '@babel/preset-react' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(84,33): error TS2307: Cannot find module '@babel/preset-flow' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(89,15): error TS2307: Cannot find module 'babel-plugin-macros' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(93,15): error TS2307: Cannot find module '@babel/plugin-transform-destructuring' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(98,17): error TS2307: Cannot find module '@babel/plugin-proposal-class-properties' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(107,17): error TS2307: Cannot find module '@babel/plugin-proposal-object-rest-spread' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(114,17): error TS2307: Cannot find module '@babel/plugin-transform-runtime' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(123,17): error TS2307: Cannot find module 'babel-plugin-transform-react-remove-prop-types' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(130,17): error TS2307: Cannot find module '@babel/plugin-transform-regenerator' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(137,15): error TS2307: Cannot find module '@babel/plugin-syntax-dynamic-import' or its corresponding type declarations. +packages/babel-preset-react-app/index.js(140,17): error TS2307: Cannot find module 'babel-plugin-transform-dynamic-import' or its corresponding type declarations. packages/confusing-browser-globals/test.js(14,1): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. packages/confusing-browser-globals/test.js(15,3): error TS2304: Cannot find name 'expect'. packages/confusing-browser-globals/test.js(18,1): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. packages/confusing-browser-globals/test.js(19,3): error TS2304: Cannot find name 'expect'. -packages/create-react-app/createReactApp.js(37,37): error TS2307: Cannot find module 'validate-npm-package-name'. -packages/create-react-app/createReactApp.js(47,24): error TS2307: Cannot find module 'tar-pack'. -packages/create-react-app/createReactApp.js(49,28): error TS2307: Cannot find module 'hyperquest'. -packages/create-react-app/createReactApp.js(50,25): error TS2307: Cannot find module 'envinfo'. -packages/create-react-app/createReactApp.js(52,30): error TS2307: Cannot find module 'react-dev-utils/workspaceUtils'. +packages/create-react-app/createReactApp.js(37,37): error TS2307: Cannot find module 'validate-npm-package-name' or its corresponding type declarations. +packages/create-react-app/createReactApp.js(47,24): error TS2307: Cannot find module 'tar-pack' or its corresponding type declarations. +packages/create-react-app/createReactApp.js(49,28): error TS2307: Cannot find module 'hyperquest' or its corresponding type declarations. +packages/create-react-app/createReactApp.js(50,25): error TS2307: Cannot find module 'envinfo' or its corresponding type declarations. +packages/create-react-app/createReactApp.js(52,30): error TS2307: Cannot find module 'react-dev-utils/workspaceUtils' or its corresponding type declarations. packages/create-react-app/createReactApp.js(53,29): error TS2732: Cannot find module './package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension packages/create-react-app/createReactApp.js(771,20): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. packages/create-react-app/index.js(45,5): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. -packages/eslint-config-react-app/index.js(24,33): error TS2307: Cannot find module 'confusing-browser-globals'. -packages/react-dev-utils/FileSizeReporter.js(13,24): error TS2307: Cannot find module 'filesize'. -packages/react-dev-utils/FileSizeReporter.js(14,25): error TS2307: Cannot find module 'recursive-readdir'. -packages/react-dev-utils/FileSizeReporter.js(16,24): error TS2307: Cannot find module 'gzip-size'. -packages/react-dev-utils/WebpackDevServerUtils.js(9,25): error TS2307: Cannot find module 'address'. -packages/react-dev-utils/WebpackDevServerUtils.js(14,24): error TS2307: Cannot find module 'detect-port-alt'. -packages/react-dev-utils/WebpackDevServerUtils.js(15,24): error TS2307: Cannot find module 'is-root'. +packages/eslint-config-react-app/index.js(24,33): error TS2307: Cannot find module 'confusing-browser-globals' or its corresponding type declarations. +packages/react-dev-utils/FileSizeReporter.js(13,24): error TS2307: Cannot find module 'filesize' or its corresponding type declarations. +packages/react-dev-utils/FileSizeReporter.js(14,25): error TS2307: Cannot find module 'recursive-readdir' or its corresponding type declarations. +packages/react-dev-utils/FileSizeReporter.js(16,24): error TS2307: Cannot find module 'gzip-size' or its corresponding type declarations. +packages/react-dev-utils/WebpackDevServerUtils.js(9,25): error TS2307: Cannot find module 'address' or its corresponding type declarations. +packages/react-dev-utils/WebpackDevServerUtils.js(14,24): error TS2307: Cannot find module 'detect-port-alt' or its corresponding type declarations. +packages/react-dev-utils/WebpackDevServerUtils.js(15,24): error TS2307: Cannot find module 'is-root' or its corresponding type declarations. packages/react-dev-utils/__tests__/ignoredFiles.test.js(12,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. packages/react-dev-utils/__tests__/ignoredFiles.test.js(13,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. packages/react-dev-utils/__tests__/ignoredFiles.test.js(18,5): error TS2304: Cannot find name 'expect'. @@ -48,8 +48,8 @@ packages/react-dev-utils/__tests__/ignoredFiles.test.js(40,3): error TS2582: Can packages/react-dev-utils/__tests__/ignoredFiles.test.js(46,5): error TS2304: Cannot find name 'expect'. packages/react-dev-utils/__tests__/ignoredFiles.test.js(49,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. packages/react-dev-utils/__tests__/ignoredFiles.test.js(53,5): error TS2304: Cannot find name 'expect'. -packages/react-dev-utils/browsersHelper.js(9,30): error TS2307: Cannot find module 'browserslist'. -packages/react-dev-utils/browsersHelper.js(13,23): error TS2307: Cannot find module 'pkg-up'. +packages/react-dev-utils/browsersHelper.js(9,30): error TS2307: Cannot find module 'browserslist' or its corresponding type declarations. +packages/react-dev-utils/browsersHelper.js(13,23): error TS2307: Cannot find module 'pkg-up' or its corresponding type declarations. packages/react-dev-utils/browsersHelper.js(61,36): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. packages/react-dev-utils/browsersHelper.js(97,25): error TS2538: Type 'undefined' cannot be used as an index type. packages/react-dev-utils/checkRequiredFiles.js(19,34): error TS2339: Property 'F_OK' does not exist on type 'typeof import("fs")'. @@ -58,9 +58,9 @@ packages/react-dev-utils/checkRequiredFiles.js(24,34): error TS2345: Argument of packages/react-dev-utils/getProcessForPort.js(29,6): error TS2339: Property 'split' does not exist on type 'Buffer'. packages/react-dev-utils/getProcessForPort.js(49,21): error TS2339: Property 'replace' does not exist on type 'Buffer'. packages/react-dev-utils/getProcessForPort.js(63,5): error TS2339: Property 'trim' does not exist on type 'Buffer'. -packages/react-dev-utils/openBrowser.js(13,19): error TS2307: Cannot find module 'opn'. -packages/react-dev-utils/webpackHotDevClient.js(19,22): error TS2307: Cannot find module 'sockjs-client'. -packages/react-dev-utils/webpackHotDevClient.js(24,28): error TS2307: Cannot find module 'react-error-overlay'. +packages/react-dev-utils/openBrowser.js(13,19): error TS2307: Cannot find module 'opn' or its corresponding type declarations. +packages/react-dev-utils/webpackHotDevClient.js(19,22): error TS2307: Cannot find module 'sockjs-client' or its corresponding type declarations. +packages/react-dev-utils/webpackHotDevClient.js(24,28): error TS2307: Cannot find module 'react-error-overlay' or its corresponding type declarations. packages/react-dev-utils/webpackHotDevClient.js(31,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'. packages/react-dev-utils/webpackHotDevClient.js(33,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'. packages/react-dev-utils/webpackHotDevClient.js(35,14): error TS2339: Property 'encodeURIComponent' does not exist on type 'Window'. @@ -71,7 +71,7 @@ packages/react-dev-utils/webpackHotDevClient.js(223,40): error TS2304: Cannot fi packages/react-dev-utils/webpackHotDevClient.js(228,17): error TS2339: Property 'hot' does not exist on type 'NodeModule'. packages/react-dev-utils/webpackHotDevClient.js(233,15): error TS2339: Property 'hot' does not exist on type 'NodeModule'. packages/react-dev-utils/webpackHotDevClient.js(261,23): error TS2339: Property 'hot' does not exist on type 'NodeModule'. -packages/react-dev-utils/workspaceUtils.js(11,25): error TS2307: Cannot find module 'find-pkg'. +packages/react-dev-utils/workspaceUtils.js(11,25): error TS2307: Cannot find module 'find-pkg' or its corresponding type declarations. diff --git a/tests/baselines/reference/user/npm.log b/tests/baselines/reference/user/npm.log index a9ba30c5c7436..6d5287dd212ce 100644 --- a/tests/baselines/reference/user/npm.log +++ b/tests/baselines/reference/user/npm.log @@ -905,10 +905,10 @@ node_modules/npm/scripts/index-build.js(23,22): error TS2531: Object is possibly node_modules/npm/scripts/index-build.js(24,15): error TS2531: Object is possibly 'null'. node_modules/npm/scripts/index-build.js(24,22): error TS2531: Object is possibly 'null'. node_modules/npm/scripts/publish-tag.js(2,36): error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -node_modules/npm/test/broken-under-nyc-and-travis/lifecycle-path.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/broken-under-nyc-and-travis/lifecycle-path.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/broken-under-nyc-and-travis/lifecycle-path.js(18,23): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/npm/test/broken-under-nyc-and-travis/whoami.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/broken-under-nyc-and-travis/whoami.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/common-tap.js(5,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/common-tap.js(10,3): error TS2741: Property '__promisify__' is missing in type '(...args: any[]) => void' but required in type 'typeof setImmediate'. node_modules/npm/test/common-tap.js(10,36): error TS2322: Type '(...args: any[]) => void' is not assignable to type '(callback: (...args: any[]) => void, ...args: any[]) => Immediate'. @@ -918,242 +918,242 @@ node_modules/npm/test/common-tap.js(12,28): error TS2345: Argument of type 'any[ node_modules/npm/test/common-tap.js(175,17): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(181,31): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(192,12): error TS2339: Property '_storage' does not exist on type 'Environment'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(4,19): error TS2307: Cannot find module '../../lib/npm.js'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(5,22): error TS2307: Cannot find module '../common-tap.js'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(25,27): error TS2307: Cannot find module '../../lib/cache/add-remote-git.js'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(6,25): error TS2307: Cannot find module 'deep-equal'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(13,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/ignore-shrinkwrap.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/ignore-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/legacy-array-bin.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/legacy-array-bin.js(11,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(11,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(4,19): error TS2307: Cannot find module '../../lib/npm.js' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(5,22): error TS2307: Cannot find module '../common-tap.js' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/add-remote-git-get-resolved.js(25,27): error TS2307: Cannot find module '../../lib/cache/add-remote-git.js' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(6,25): error TS2307: Cannot find module 'deep-equal' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/belongs-in-pacote/git-races.js(13,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/ignore-shrinkwrap.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/ignore-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-array-bin.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-array-bin.js(11,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(11,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(12,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(34,42): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'. Type 'IArguments' is missing the following properties from type 'string[]': pop, push, concat, join, and 26 more. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(48,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(49,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'. -node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(6,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/need-npm5-update/lifecycle-signal.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(3,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/lifecycle-signal.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(11,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'. -node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(10,22): error TS2307: Cannot find module '../common-tap.js'. -node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(8,22): error TS2307: Cannot find module '../common-tap.js'. -node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(10,22): error TS2307: Cannot find module '../common-tap.js' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(8,22): error TS2307: Cannot find module '../common-tap.js' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(69,52): error TS2322: Type 'number' is not assignable to type 'string'. -node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(55,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(62,11): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(64,13): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(38,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-include-devdependencies.js(39,11): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-local.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/outdated-local.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/need-npm5-update/outdated-local.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-local.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-local.js(107,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-local.js(114,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-local.js(117,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-new-versions.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/outdated-new-versions.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/outdated-new-versions.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-new-versions.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-new-versions.js(42,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-new-versions.js(43,11): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-notarget.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/outdated-notarget.js(12,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/need-npm5-update/outdated-notarget.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-notarget.js(12,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-notarget.js(18,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-notarget.js(19,11): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-private.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/outdated-private.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/need-npm5-update/outdated-private.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-private.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-private.js(58,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-private.js(65,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/outdated-private.js(68,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/outdated-symlink.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/outdated-symlink.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/outdated-symlink.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/outdated-symlink.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/outdated-symlink.js(13,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(74,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/peer-deps-invalid.js(80,13): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(5,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/peer-deps-toplevel.js(8,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(50,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/need-npm5-update/peer-deps-without-package-json.js(54,11): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/need-npm5-update/rm-linked.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(6,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/need-npm5-update/rm-linked.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/shrinkwrap-complete-except-dev.js(9,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/need-npm5-update/shrinkwrap-dev-dep-cycle.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/need-npm5-update/shrinkwrap-dev-dep-cycle.js(5,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/need-npm5-update/shrinkwrap-dev-dep-cycle.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/need-npm5-update/shrinkwrap-dev-dep-cycle.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/need-npm5-update/shrinkwrap-dev-dep-cycle.js(76,23): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/network/git-cache-locking.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/network/git-cache-locking.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/network/git-cache-locking.js(9,53): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/network/git-cache-no-hooks.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/network/legacy-bundled-git.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/network/legacy-bundled-git.js(11,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/network/legacy-url-dep.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/network/legacy-url-dep.js(10,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/network/registry.js(5,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/network/git-cache-no-hooks.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/network/legacy-bundled-git.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/network/legacy-bundled-git.js(11,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/network/legacy-url-dep.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/network/legacy-url-dep.js(10,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/network/registry.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/network/registry.js(29,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/tap/00-check-mock-dep.js(12,20): error TS2732: Cannot find module 'npm-registry-mock/package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension node_modules/npm/test/tap/00-check-mock-dep.js(13,19): error TS2732: Cannot find module '../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -node_modules/npm/test/tap/00-verify-bundle-deps.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/00-verify-bundle-deps.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/00-verify-bundle-deps.js(3,24): error TS2732: Cannot find module '../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -node_modules/npm/test/tap/00-verify-ls-ok.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/00-verify-no-scoped.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/404-parent.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/404-parent.js(10,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/00-verify-ls-ok.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/00-verify-no-scoped.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/404-parent.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/404-parent.js(10,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/404-parent.js(47,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/404-parent.js(50,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/404-parent.js(53,11): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/404-private-registry-scoped.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/404-private-registry-scoped.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/404-private-registry.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/404-private-registry.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/access.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/access.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/add-named-update-protocol-port.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/add-named-update-protocol-port.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/add-remote-git-file.js(10,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/404-private-registry-scoped.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/404-private-registry-scoped.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/404-private-registry.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/404-private-registry.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/access.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/access.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/add-named-update-protocol-port.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/add-named-update-protocol-port.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/add-remote-git-file.js(10,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/add-remote-git-file.js(56,18): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-file.js(57,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-file.js(58,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-file.js(59,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-file.js(86,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/add-remote-git-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/add-remote-git-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/add-remote-git-shrinkwrap.js(104,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/add-remote-git-submodule.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/add-remote-git-submodule.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/add-remote-git-submodule.js(45,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-submodule.js(53,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git-submodule.js(87,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/add-remote-git.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/add-remote-git.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/add-remote-git.js(48,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/add-remote-git.js(71,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/adduser-always-auth.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/adduser-always-auth.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/adduser-legacy-auth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/adduser-legacy-auth.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/adduser-oauth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/adduser-oauth.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/adduser-saml.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/adduser-saml.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/all-package-metadata-cache-stream-unit.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/all-package-metadata-cache-stream-unit.js(9,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(9,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(11,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/adduser-always-auth.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-always-auth.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-legacy-auth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-legacy-auth.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-oauth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-oauth.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-saml.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/adduser-saml.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-cache-stream-unit.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-cache-stream-unit.js(9,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(9,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(11,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/all-package-metadata-entry-stream-unit.js(33,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/all-package-metadata-update-stream-unit.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/all-package-metadata-update-stream-unit.js(9,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/all-package-metadata-update-stream-unit.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata-update-stream-unit.js(9,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/all-package-metadata-update-stream-unit.js(31,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(5,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(34,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(66,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(98,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/all-package-metadata-write-stream-unit.js(121,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/all-package-metadata.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/all-package-metadata.js(11,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/all-package-metadata.js(13,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/all-package-metadata.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata.js(11,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/all-package-metadata.js(13,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/all-package-metadata.js(36,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/all-package-metadata.js(38,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/all-package-metadata.js(39,33): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/all-package-metadata.js(73,31): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/all-package-metadata.js(117,31): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/all-package-metadata.js(175,31): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/anon-cli-metrics.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/anon-cli-metrics.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/anon-cli-metrics.js(7,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/anon-cli-metrics.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/anon-cli-metrics.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/anon-cli-metrics.js(7,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/anon-cli-metrics.js(10,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/auto-prune.js(3,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/auto-prune.js(4,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/auto-prune.js(5,23): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/auto-prune.js(3,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/auto-prune.js(4,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/auto-prune.js(5,23): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/auto-prune.js(8,49): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/bearer-token-check.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bin.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bitbucket-https-url-with-creds.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/bitbucket-https-url-with-creds.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bitbucket-shortcut-package.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/bitbucket-shortcut-package.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bitbucket-shortcut.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/bitbucket-shortcut.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bugs.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/bugs.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/build-already-built.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/build-already-built.js(9,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/bearer-token-check.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bin.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-https-url-with-creds.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-https-url-with-creds.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-shortcut-package.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-shortcut-package.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-shortcut.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/bitbucket-shortcut.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bugs.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/bugs.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/build-already-built.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/build-already-built.js(9,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/build-already-built.js(23,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/build-already-built.js(33,22): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/builtin-config.js(14,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bundled-dependencies-nonarray.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bundled-dependencies.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bundled-dependencies.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/bundled-no-add-to-move.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/builtin-config.js(14,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bundled-dependencies-nonarray.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bundled-dependencies.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bundled-dependencies.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/bundled-no-add-to-move.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/bundled-no-add-to-move.js(42,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/bundled-transitive-deps.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/bundled-transitive-deps.js(5,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/bundled-transitive-deps.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/bundled-transitive-deps.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/bundled-transitive-deps.js(74,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/cache-add-unpublished.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/cache-shasum-fork.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/cache-shasum-fork.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/check-cpu-reqs.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/check-engine-reqs.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/check-install-self.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/check-os-reqs.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/check-permissions.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ci-header.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ci-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ci-header.js(5,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/ci.js(7,33): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ci.js(10,23): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/ci.js(11,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/cache-add-unpublished.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/cache-shasum-fork.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/cache-shasum-fork.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/check-cpu-reqs.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/check-engine-reqs.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/check-install-self.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/check-os-reqs.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/check-permissions.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ci-header.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ci-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ci-header.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/ci.js(7,33): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ci.js(10,23): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/ci.js(11,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/circular-dep.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/circular-dep.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/circular-dep.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-basic.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/circular-dep.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/circular-dep.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-basic.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/config-basic.js(81,12): error TS2531: Object is possibly 'null'. node_modules/npm/test/tap/config-basic.js(81,29): error TS2339: Property 'list' does not exist on type 'Conf'. node_modules/npm/test/tap/config-basic.js(82,24): error TS2531: Object is possibly 'null'. -node_modules/npm/test/tap/config-builtin.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/config-builtin.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/config-builtin.js(60,12): error TS2531: Object is possibly 'null'. node_modules/npm/test/tap/config-builtin.js(60,29): error TS2339: Property 'list' does not exist on type 'Conf'. node_modules/npm/test/tap/config-builtin.js(61,13): error TS2531: Object is possibly 'null'. -node_modules/npm/test/tap/config-certfile.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-credentials.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-edit.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-envReplace.js(6,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-list.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-malformed.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-meta.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/config-certfile.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-credentials.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-edit.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-envReplace.js(6,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-list.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-malformed.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-meta.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/config-meta.js(63,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/npm/test/tap/config-new-cafile.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-private.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/config-project.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/config-new-cafile.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-private.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/config-project.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/config-project.js(59,12): error TS2531: Object is possibly 'null'. node_modules/npm/test/tap/config-project.js(59,29): error TS2339: Property 'list' does not exist on type 'Conf'. node_modules/npm/test/tap/config-project.js(60,13): error TS2531: Object is possibly 'null'. -node_modules/npm/test/tap/config-save.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/correct-mkdir.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/correct-mkdir.js(4,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/config-save.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/correct-mkdir.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/correct-mkdir.js(4,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/correct-mkdir.js(14,23): error TS2339: Property 'uid' does not exist on type 'Process'. node_modules/npm/test/tap/correct-mkdir.js(96,3): error TS2322: Type '999' is not assignable to type 'string | undefined'. node_modules/npm/test/tap/correct-mkdir.js(97,3): error TS2322: Type '999' is not assignable to type 'string | undefined'. @@ -1161,42 +1161,42 @@ node_modules/npm/test/tap/correct-mkdir.js(114,16): error TS2532: Object is poss node_modules/npm/test/tap/correct-mkdir.js(115,16): error TS2532: Object is possibly 'undefined'. node_modules/npm/test/tap/correct-mkdir.js(131,3): error TS2322: Type '999' is not assignable to type 'string | undefined'. node_modules/npm/test/tap/correct-mkdir.js(132,3): error TS2322: Type '999' is not assignable to type 'string | undefined'. -node_modules/npm/test/tap/cruft-test.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/debug-logs.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/debug-logs.js(4,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/cruft-test.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/debug-logs.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/debug-logs.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/debug-logs.js(9,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/dedupe-scoped.js(6,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/dedupe-scoped.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/dedupe.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/dedupe.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/dedupe.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/deprecate.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/deprecate.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/dist-tag.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/dist-tag.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/do-not-remove-other-bins.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/doctor.js(5,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/doctor.js(9,23): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/doctor.js(10,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/dedupe.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/dedupe.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/deprecate.js(1,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/deprecate.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/dist-tag.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/dist-tag.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/do-not-remove-other-bins.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/doctor.js(5,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/doctor.js(9,23): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/doctor.js(10,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/doctor.js(66,11): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/doctor.js(82,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/doctor.js(86,34): error TS2339: Property 'version' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/extraneous-dep-cycle-ls-ok.js(5,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/extraneous-dep-cycle-ls-ok.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/false-name.js(12,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/false-name.js(15,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/false-name.js(17,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/fetch-package-metadata.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/fetch-package-metadata.js(9,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/false-name.js(15,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/false-name.js(17,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/fetch-package-metadata.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/fetch-package-metadata.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/fetch-package-metadata.js(36,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/full-warning-messages.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gently-rm-cmdshims.js(4,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/full-warning-messages.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gently-rm-cmdshims.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/gently-rm-cmdshims.js(107,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/gently-rm-linked-module.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gently-rm-linked-module.js(8,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/gently-rm-linked-module.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gently-rm-linked-module.js(8,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/gently-rm-linked-module.js(12,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/gently-rm-overeager.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gently-rm-symlinked-global-dir.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/get.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/get.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/gently-rm-overeager.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gently-rm-symlinked-global-dir.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/get.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/get.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/get.js(40,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/get.js(50,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/get.js(54,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. @@ -1207,176 +1207,176 @@ node_modules/npm/test/tap/get.js(70,9): error TS2339: Property 'registry' does n node_modules/npm/test/tap/get.js(80,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/get.js(86,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/get.js(92,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/gist-short-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gist-short-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gist-short-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gist-short-shortcut.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gist-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gist-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gist-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gist-shortcut.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/git-dependency-install-link.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/git-dependency-install-link.js(9,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/gist-short-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gist-short-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gist-short-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gist-short-shortcut.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gist-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gist-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gist-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gist-shortcut.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/git-dependency-install-link.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/git-dependency-install-link.js(9,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/git-dependency-install-link.js(125,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/git-npmignore.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/git-npmignore.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/git-prepare.js(8,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/git-prepare.js(9,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/git-prepare.js(19,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/git-npmignore.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/git-npmignore.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/git-prepare.js(8,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/git-prepare.js(9,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/git-prepare.js(19,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/git-prepare.js(131,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/github-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/github-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/github-shortcut.js(10,31): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/github-shortcut.js(12,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gitlab-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gitlab-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/gitlab-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/gitlab-shortcut.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/global-prefix-set-in-userconfig.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/graceful-restart.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/help.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ignore-install-link.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ignore-scripts.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/init-create.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/init-create.js(3,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/github-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/github-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/github-shortcut.js(10,31): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/github-shortcut.js(12,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gitlab-shortcut-package.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gitlab-shortcut-package.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/gitlab-shortcut.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/gitlab-shortcut.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/global-prefix-set-in-userconfig.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/graceful-restart.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/help.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ignore-install-link.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ignore-scripts.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/init-create.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/init-create.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/init-create.js(25,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/init-create.js(42,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/init-create.js(47,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise'. node_modules/npm/test/tap/init-create.js(53,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise'. node_modules/npm/test/tap/init-create.js(68,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/init-create.js(74,16): error TS2339: Property 'parseArgs' does not exist on type '() => Promise'. -node_modules/npm/test/tap/init-interrupt.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/init-interrupt.js(8,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/init-interrupt.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/init-interrupt.js(8,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/init-interrupt.js(28,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/install-actions.js(4,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-actions.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-actions.js(13,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/install-actions.js(108,27): error TS2345: Argument of type '{ path: string; package: { dependencies: { b: string; }; optionalDependencies: { a: string; }; }; children: ({ name: string; path: string; package: { scripts: { postinstall: string; }; dependencies: { b: string; }; }; isTop: boolean; } | { ...; })[]; requires: ({ ...; } | { ...; })[]; isTop: boolean; }' is not assignable to parameter of type '{ name: string; path: string; package: { scripts: { postinstall: string; }; dependencies: { b: string; }; }; isTop: boolean; }'. Property 'name' is missing in type '{ path: string; package: { dependencies: { b: string; }; optionalDependencies: { a: string; }; }; children: ({ name: string; path: string; package: { scripts: { postinstall: string; }; dependencies: { b: string; }; }; isTop: boolean; } | { ...; })[]; requires: ({ ...; } | { ...; })[]; isTop: boolean; }' but required in type '{ name: string; path: string; package: { scripts: { postinstall: string; }; dependencies: { b: string; }; }; isTop: boolean; }'. -node_modules/npm/test/tap/install-at-locally.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-bad-dep-format.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-bad-man.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-bin-null.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-at-locally.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-bad-dep-format.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-bad-man.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-bin-null.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-cli-only-development.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-cli-only-development.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-cli-only-development.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-cli-only-production.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-cli-only-production.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-cli-only-production.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-cli-only-shrinkwrap.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-cli-only-shrinkwrap.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-cli-production-nosave.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-cli-production-nosave.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-cli-only-shrinkwrap.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-cli-production-nosave.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-cli-production-nosave.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-cli-production.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-cli-production.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-cli-unicode.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-cli-unicode.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-contributors-count.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-contributors-count.js(4,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/install-duplicate-deps-warning.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-duplicate-deps-warning.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-from-local.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-into-likenamed-folder.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-link-scripts.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-local-dep-cycle.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-man.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-noargs-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-noargs-dev.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-cli-production.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-cli-unicode.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-cli-unicode.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-contributors-count.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-contributors-count.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/install-duplicate-deps-warning.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-duplicate-deps-warning.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-from-local.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-into-likenamed-folder.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-link-scripts.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-local-dep-cycle.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-man.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-noargs-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-noargs-dev.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-noargs-dev.js(56,32): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/install-noargs-dev.js(83,32): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/install-order.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-package-json-order.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-package-lock-only.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-package-lock-only.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-package-lock-only.js(6,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/install-order.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-package-json-order.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-package-lock-only.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-package-lock-only.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-package-lock-only.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/install-package-lock-only.js(9,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/install-parse-error.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-parse-error.js(4,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/install-property-conflicts.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-report-just-installed.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-report-just-installed.js(4,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/install-save-consistent-newlines.js(7,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-save-consistent-newlines.js(10,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-save-exact.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-save-exact.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-save-local.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-save-prefix.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-save-prefix.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-parse-error.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-parse-error.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/install-property-conflicts.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-report-just-installed.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-report-just-installed.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-consistent-newlines.js(7,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-consistent-newlines.js(10,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-exact.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-exact.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-local.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-prefix.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-save-prefix.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-save-prefix.js(46,23): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/install-save-prefix.js(78,23): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/install-save-prefix.js(110,23): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/install-save-prefix.js(142,23): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/install-scoped-already-installed.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-scoped-already-installed.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-scoped-already-installed.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-scoped-link.js(4,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-scoped-link.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(4,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/install-scoped-link.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/install-scoped-with-bundled-dependency.js(7,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/install-scoped-with-peer-dependency.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-shrinkwrapped-git.js(9,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-scoped-with-peer-dependency.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-shrinkwrapped-git.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-shrinkwrapped-git.js(56,12): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/install-shrinkwrapped-git.js(60,12): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/install-shrinkwrapped-git.js(65,12): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/install-shrinkwrapped-git.js(106,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/install-test-cli-without-package-lock.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/install-test-cli-without-package-lock.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/install-windows-newlines.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/install-windows-newlines.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/install-with-dev-dep-duplicate.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/install-with-dev-dep-duplicate.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/invalid-cmd-exit-code.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/invalid-dep-version-filtering.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/invalid-dep-version-filtering.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/invalid-dep-version-filtering.js(6,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/is-fs-access-available.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/is-fs-access-available.js(4,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/install-windows-newlines.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/install-with-dev-dep-duplicate.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/install-with-dev-dep-duplicate.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/invalid-cmd-exit-code.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/invalid-dep-version-filtering.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/invalid-dep-version-filtering.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/invalid-dep-version-filtering.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/is-fs-access-available.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/is-fs-access-available.js(4,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/is-fs-access-available.js(6,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/is-registry.js(2,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/it.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/it.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-ignore-nested-nm.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-ignore-nested-nm.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-missing-bindir.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-missing-bindir.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-no-auth-leak.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-no-auth-leak.js(6,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-platform-all.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-platform-all.js(10,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-platform.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-platform.js(10,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-private.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-private.js(10,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/legacy-test-package.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/legacy-test-package.js(11,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/lifecycle-INIT_CWD.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/lifecycle-order.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/link.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/local-args-relative-to-cwd.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/local-args-relative-to-cwd.js(5,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/locker.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/is-registry.js(2,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/it.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/it.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-ignore-nested-nm.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-ignore-nested-nm.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-missing-bindir.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-missing-bindir.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-no-auth-leak.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-no-auth-leak.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-platform-all.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-platform-all.js(10,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-platform.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-platform.js(10,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-private.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-private.js(10,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-test-package.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/legacy-test-package.js(11,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/lifecycle-INIT_CWD.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/lifecycle-order.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/link.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/local-args-relative-to-cwd.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/local-args-relative-to-cwd.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/locker.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/locker.js(31,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/locker.js(61,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/lockfile-http-deps.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/lockfile-http-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/lockfile-http-deps.js(6,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/lockfile-http-deps.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/lockfile-http-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/lockfile-http-deps.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/lockfile-http-deps.js(9,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/tap/lockfile-http-deps.js(81,35): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/logout-scoped.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/logout-scoped.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/logout.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/logout.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-depth-cli.js(6,37): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ls-depth-cli.js(9,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-depth-unmet.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ls-depth-unmet.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-env.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ls-env.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-l-depth-0.js(6,37): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ls-l-depth-0.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-no-results.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-production-and-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ls-production-and-dev.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls-top-errors.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/ls.js(9,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/map-to-registry.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/logout-scoped.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/logout-scoped.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/logout.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/logout.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-depth-cli.js(6,37): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ls-depth-cli.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-depth-unmet.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ls-depth-unmet.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-env.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ls-env.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-l-depth-0.js(6,37): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ls-l-depth-0.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-no-results.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-production-and-dev.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ls-production-and-dev.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls-top-errors.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/ls.js(9,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/map-to-registry.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/map-to-registry.js(14,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/map-to-registry.js(23,28): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/map-to-registry.js(38,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -1398,68 +1398,68 @@ node_modules/npm/test/tap/map-to-registry.js(101,11): error TS2339: Property 'co node_modules/npm/test/tap/map-to-registry.js(123,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/map-to-registry.js(143,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/map-to-registry.js(146,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/nerf-dart.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/nested-extraneous.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/no-global-warns.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/no-scan-full-global-dir.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/no-scan-full-global-dir.js(5,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/nerf-dart.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/nested-extraneous.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/no-global-warns.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/no-scan-full-global-dir.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/no-scan-full-global-dir.js(5,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/no-scan-full-global-dir.js(28,6): error TS2339: Property 'code' does not exist on type 'Error'. node_modules/npm/test/tap/no-scan-full-global-dir.js(34,6): error TS2339: Property 'code' does not exist on type 'Error'. node_modules/npm/test/tap/no-scan-full-global-dir.js(43,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/noargs-install-config-save.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/noargs-install-config-save.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/node-modules-path-munge.js(2,17): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/normalize-package-explode.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/noargs-install-config-save.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/noargs-install-config-save.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/node-modules-path-munge.js(2,17): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/normalize-package-explode.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/normalize-package-explode.js(16,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/npm-api-not-loaded-error.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/npm-api-not-loaded-error.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/npm-api-not-loaded-error.js(16,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/npm-api-not-loaded-error.js(26,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/npm-api-not-loaded-error.js(34,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/npm-api-not-loaded-error.js(37,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/npm-api-not-loaded-error.js(38,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/npm-api-not-loaded-error.js(39,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/onload.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/optional-metadep-rollback-collision.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/optional-metadep-rollback-collision.js(17,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated-bad-read-tree.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/outdated-bad-read-tree.js(3,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/onload.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/optional-metadep-rollback-collision.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/optional-metadep-rollback-collision.js(17,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-bad-read-tree.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-bad-read-tree.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/outdated-bad-read-tree.js(7,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/outdated-color.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated-color.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/outdated-depth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated-depth.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/outdated-color.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-color.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-depth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-depth.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/outdated-depth.js(48,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-depth.js(54,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-depth.js(56,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/outdated-git.js(3,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/outdated-git.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/outdated-git.js(35,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-git.js(36,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/outdated-json.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated-json.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/outdated-long.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated-long.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/outdated-json.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-json.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-long.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated-long.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/outdated-long.js(63,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more. node_modules/npm/test/tap/outdated-long.js(66,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-long.js(74,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-long.js(76,15): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-long.js(77,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/outdated.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/outdated.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/outdated.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/outdated.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/outdated.js(92,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated.js(100,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated.js(103,39): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/npm/test/tap/outdated.js(105,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/override-bundled.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/owner.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/owner.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/pack-files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/pack-files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/pack-scoped.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/pack.js(5,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/peer-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/peer-deps.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/override-bundled.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/owner.js(1,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/owner.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/pack-files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/pack-files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/pack-scoped.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/pack.js(5,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/peer-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/peer-deps.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(21,11): error TS2532: Object is possibly 'undefined'. node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(22,11): error TS2532: Object is possibly 'undefined'. node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(24,11): error TS2532: Object is possibly 'undefined'. @@ -1476,221 +1476,221 @@ node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(116,11): error node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(117,11): error TS2532: Object is possibly 'undefined'. node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(136,11): error TS2532: Object is possibly 'undefined'. node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(137,11): error TS2532: Object is possibly 'undefined'. -node_modules/npm/test/tap/ping.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/ping.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prepare.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prepublish-only.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/prepublish-only.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prepublish-only.js(6,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/prepublish.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/process-logger.js(2,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/ping.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/ping.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prepare.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prepublish-only.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/prepublish-only.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prepublish-only.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/prepublish.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/process-logger.js(2,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/process-logger.js(7,24): error TS2554: Expected 1-3 arguments, but got 4. node_modules/npm/test/tap/process-logger.js(8,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'. node_modules/npm/test/tap/process-logger.js(9,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'. node_modules/npm/test/tap/process-logger.js(10,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'. -node_modules/npm/test/tap/progress-config.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/progress-config.js(12,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/prune-dev-dep-cycle.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prune-dev-dep-cycle.js(5,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/prune-dev-dep-with-bins.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prune-dev-dep-with-bins.js(5,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/prune-with-dev-dep-duplicate.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/prune-with-dev-dep-duplicate.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prune-with-only-dev-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/prune-with-only-dev-deps.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/prune.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/prune.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-access-scoped.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-access-scoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-access-unscoped.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-access-unscoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/publish-config.js(4,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-invalid-semver-tag.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-invalid-semver-tag.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/progress-config.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/progress-config.js(12,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/prune-dev-dep-cycle.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prune-dev-dep-cycle.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/prune-dev-dep-with-bins.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prune-dev-dep-with-bins.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/prune-with-dev-dep-duplicate.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/prune-with-dev-dep-duplicate.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prune-with-only-dev-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/prune-with-only-dev-deps.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/prune.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/prune.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-access-scoped.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-access-scoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-access-unscoped.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-access-unscoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/publish-config.js(4,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-invalid-semver-tag.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-invalid-semver-tag.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/publish-invalid-semver-tag.js(37,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(53,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(54,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(64,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(65,7): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/publish-scoped.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/publish-scoped.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/publish.js(8,33): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/publish.js(11,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/publish-scoped.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/publish-scoped.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/publish.js(8,33): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/publish.js(11,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish.js(56,47): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string | RegExp'. node_modules/npm/test/tap/publish.js(117,45): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string | RegExp'. -node_modules/npm/test/tap/pwd-prefix.js(5,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/referer.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/repo.js(2,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/repo.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/retry-on-stale-cache.js(3,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/retry-on-stale-cache.js(4,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/pwd-prefix.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/referer.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/repo.js(2,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/repo.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/retry-on-stale-cache.js(3,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/retry-on-stale-cache.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/retry-on-stale-cache.js(6,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/retry-on-stale-cache.js(7,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/run-script-filter-private.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/run-script.js(5,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/retry-on-stale-cache.js(7,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/run-script-filter-private.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/run-script.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/run-script.js(213,18): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. node_modules/npm/test/tap/run-script.js(256,18): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/npm/test/tap/save-optional.js(3,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/save-optional.js(4,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/save-optional.js(5,23): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/save-optional.js(3,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/save-optional.js(4,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/save-optional.js(5,23): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/save-optional.js(70,30): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/scope-header.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/scope-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/scope-header.js(5,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/scripts-whitespace-windows.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/scope-header.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/scope-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/scope-header.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/scripts-whitespace-windows.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/scripts-whitespace-windows.js(38,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/search.all-package-search.js(3,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/search.all-package-search.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/search.all-package-search.js(8,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/search.esearch.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/search.esearch.js(9,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/search.all-package-search.js(3,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/search.all-package-search.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/search.all-package-search.js(8,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/search.esearch.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/search.esearch.js(9,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/search.esearch.js(33,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/search.js(3,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/search.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/search.js(8,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/semver-doc.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shared-linked.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shared-linked.js(4,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/shared-linked.js(9,18): error TS2307: Cannot find module 'npm-registry-mock'. +node_modules/npm/test/tap/search.js(3,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/search.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/search.js(8,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/semver-doc.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shared-linked.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shared-linked.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/shared-linked.js(9,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/shared-linked.js(10,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/shrinkwrap-_auth.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-default-dev.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-default-dev.js(5,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/shrinkwrap-_auth.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-default-dev.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-default-dev.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-default-dev.js(8,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/tap/shrinkwrap-default-dev.js(85,28): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-dev-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-dev-dependency.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-dev-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-dev-dependency.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-dev-dependency.js(78,36): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-empty-deps.js(6,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-empty-deps.js(10,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-empty-deps.js(6,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-empty-deps.js(10,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-empty-deps.js(52,24): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(6,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(11,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(6,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(11,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(52,38): error TS2339: Property 'lockfileVersion' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/shrinkwrap-extra-metadata.js(55,24): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-global-auth.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-global-auth.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(5,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/shrinkwrap-global-auth.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-global-auth.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(5,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-lifecycle-cwd.js(8,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/shrinkwrap-lifecycle.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-local-dependency.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-local-dependency.js(6,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/shrinkwrap-nested.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-nested.js(4,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/shrinkwrap-optional-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-optional-dependency.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-optional-platform.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-optional-platform.js(4,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/shrinkwrap-lifecycle.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-local-dependency.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-local-dependency.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-nested.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-nested.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-optional-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-optional-dependency.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-optional-platform.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-optional-platform.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-optional-platform.js(7,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/shrinkwrap-optional-property.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-optional-property.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-prod-dependency-also.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-prod-dependency-also.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-optional-property.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-optional-property.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-prod-dependency-also.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-prod-dependency-also.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-prod-dependency-also.js(43,38): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-prod-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-prod-dependency.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-resolve-conflict.js(9,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-resolve-conflict.js(10,23): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-prod-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-prod-dependency.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-resolve-conflict.js(9,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-resolve-conflict.js(10,23): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js(90,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js(72,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-scoped-auth.js(8,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-scoped-auth.js(12,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-scoped-auth.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-scoped-auth.js(12,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js(69,30): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/shrinkwrap-version-match.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/shrinkwrap-version-match.js(3,21): error TS2307: Cannot find module 'tacks'. -node_modules/npm/test/tap/sorted-package-json.js(1,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/sorted-package-json.js(10,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/spawn-enoent-help.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/shrinkwrap-version-match.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/shrinkwrap-version-match.js(3,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. +node_modules/npm/test/tap/sorted-package-json.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/sorted-package-json.js(10,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/spawn-enoent-help.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/spawn-enoent-help.js(28,20): error TS2339: Property 'cooked' does not exist on type 'Global'. -node_modules/npm/test/tap/spawn-enoent.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/spec-local-specifiers.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/spec-local-specifiers.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/spec-local-specifiers.js(7,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/spawn-enoent.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/spec-local-specifiers.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/spec-local-specifiers.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/spec-local-specifiers.js(7,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/spec-local-specifiers.js(38,21): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(4,20): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(9,22): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(4,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(9,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(62,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(76,14): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(85,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js(86,16): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/startstop.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/symlink-cycle.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/tag-version-prefix.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/startstop.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/symlink-cycle.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/tag-version-prefix.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/tag-version-prefix.js(24,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/tagged-version-matching.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/tagged-version-matching.js(4,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/tagged-version-matching.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/tagged-version-matching.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/tagged-version-matching.js(8,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/team.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/team.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/test-run-ls.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/team.js(1,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/team.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/test-run-ls.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/test-run-ls.js(5,26): error TS2732: Cannot find module '../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -node_modules/npm/test/tap/tree-style.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/umask-lifecycle.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/uninstall-in-reverse.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/uninstall-in-reverse.js(3,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/tree-style.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/umask-lifecycle.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-in-reverse.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-in-reverse.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/uninstall-link-clean.js(3,40): error TS2339: Property 'existsSync' does not exist on type 'typeof import("path")'. -node_modules/npm/test/tap/uninstall-link-clean.js(7,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/uninstall-package.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/uninstall-package.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/uninstall-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/uninstall-save.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/uninstall-link-clean.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-package.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-package.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/uninstall-save.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/uninstall-save.js(42,21): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/unit-child-path.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-deps-earliestInstallable.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-deps-earliestInstallable.js(3,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(3,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/unit-child-path.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-deps-earliestInstallable.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-deps-earliestInstallable.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(32,26): error TS2345: Argument of type '{ requires: { requiredBy: never[]; }[]; }' is not assignable to parameter of type 'never'. node_modules/npm/test/tap/unit-deps-removeObsoleteDep.js(40,26): error TS2345: Argument of type '{ requires: { requiredBy: { isTop: boolean; }[]; }[]; }' is not assignable to parameter of type '{ isTop: boolean; }'. Property 'isTop' is missing in type '{ requires: { requiredBy: { isTop: boolean; }[]; }[]; }' but required in type '{ isTop: boolean; }'. -node_modules/npm/test/tap/unit-deps-replaceModule.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/unit-deps-replaceModule.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/unit-deps-replaceModule.js(6,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/unit-module-name.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-package-id.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-token-validate-cidr.js(2,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unit-token-validate-cidr.js(3,31): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/unpack-foreign-tarball.js(4,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unpublish-config.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/unsupported.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/update-examples.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/update-examples.js(6,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/update-examples.js(10,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/update-path.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/update-path.js(3,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/upgrade-lifecycles.js(3,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/upgrade-lifecycles.js(4,21): error TS2307: Cannot find module 'tacks'. +node_modules/npm/test/tap/unit-module-name.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-package-id.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-token-validate-cidr.js(2,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unit-token-validate-cidr.js(3,31): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/unpack-foreign-tarball.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unpublish-config.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/unsupported.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/update-examples.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/update-examples.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/update-examples.js(10,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/update-path.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/update-path.js(3,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/upgrade-lifecycles.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/upgrade-lifecycles.js(4,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/upgrade-lifecycles.js(7,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. -node_modules/npm/test/tap/url-dependencies.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/url-dependencies.js(8,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/verify-no-lifecycle-on-repo.js(6,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/verify-no-lifecycle-on-repo.js(7,29): error TS2307: Cannot find module 'require-inject'. -node_modules/npm/test/tap/version-allow-same-version.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/url-dependencies.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/url-dependencies.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/verify-no-lifecycle-on-repo.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/verify-no-lifecycle-on-repo.js(7,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. +node_modules/npm/test/tap/version-allow-same-version.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-allow-same-version.js(24,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-allow-same-version.js(41,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-commit-hooks-default.js(1,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-commit-hooks-default.js(1,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-commit-hooks-default.js(9,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks-default.js(10,16): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-commit-hooks.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-commit-hooks.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-commit-hooks.js(19,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks.js(23,16): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks.js(29,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks.js(30,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks.js(45,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-commit-hooks.js(46,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-consistent-newlines.js(4,22): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/version-consistent-newlines.js(11,31): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/version-consistent-newlines.js(4,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/version-consistent-newlines.js(11,31): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/version-consistent-newlines.js(20,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-consistent-newlines.js(46,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-from-git.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-from-git.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-from-git.js(25,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-from-git.js(26,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-from-git.js(54,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -1709,44 +1709,44 @@ node_modules/npm/test/tap/version-from-git.js(173,9): error TS2339: Property 'co node_modules/npm/test/tap/version-from-git.js(174,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-from-git.js(202,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-from-git.js(213,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-git-not-clean.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-git-not-clean.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-git-not-clean.js(17,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-git-not-clean.js(42,17): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-lifecycle.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-lifecycle.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-lifecycle.js(28,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-lifecycle.js(50,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-lifecycle.js(72,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-lifecycle.js(98,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-message-config.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-message-config.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-message-config.js(24,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-no-git.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/version-no-git.js(9,29): error TS2307: Cannot find module 'require-inject'. +node_modules/npm/test/tap/version-no-git.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/version-no-git.js(9,29): error TS2307: Cannot find module 'require-inject' or its corresponding type declarations. node_modules/npm/test/tap/version-no-git.js(17,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-no-package.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/version-no-tags.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-no-package.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/version-no-tags.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-no-tags.js(17,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-no-tags.js(34,13): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-no-tags.js(35,13): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(25,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(36,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(37,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(41,36): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/npm/test/tap/version-sub-directory-shrinkwrap.js(43,33): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -node_modules/npm/test/tap/version-sub-directory.js(8,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-sub-directory.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-sub-directory.js(24,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-sub-directory.js(35,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-sub-directory.js(36,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/version-update-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/version-update-shrinkwrap.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/version-update-shrinkwrap.js(17,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-update-shrinkwrap.js(18,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-update-shrinkwrap.js(31,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-update-shrinkwrap.js(42,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-update-shrinkwrap.js(73,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/version-update-shrinkwrap.js(84,9): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. -node_modules/npm/test/tap/view.js(2,20): error TS2307: Cannot find module 'tap'. -node_modules/npm/test/tap/view.js(12,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/tap/zz-cleanup.js(2,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/view.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. +node_modules/npm/test/tap/view.js(12,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. +node_modules/npm/test/tap/zz-cleanup.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log index f852b651cedd4..629f6c0a8ed97 100644 --- a/tests/baselines/reference/user/prettier.log +++ b/tests/baselines/reference/user/prettier.log @@ -19,14 +19,14 @@ src/doc/doc-printer.js(214,18): error TS2532: Object is possibly 'undefined'. src/doc/doc-printer.js(215,17): error TS2532: Object is possibly 'undefined'. src/doc/doc-printer.js(447,37): error TS2345: Argument of type 'any[][]' is not assignable to parameter of type 'never[]'. Type 'any[]' is not assignable to type 'never'. -src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'. +src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names' or its corresponding type declarations. src/language-css/parser-postcss.js(78,32): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(88,30): error TS2345: Argument of type '{ open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(93,30): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(100,30): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(104,28): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(407,32): error TS2531: Object is possibly 'null'. -src/language-css/printer-postcss.js(3,30): error TS2307: Cannot find module 'html-tag-names'. +src/language-css/printer-postcss.js(3,30): error TS2307: Cannot find module 'html-tag-names' or its corresponding type declarations. src/language-handlebars/parser-glimmer.js(27,26): error TS2345: Argument of type '{ plugins: { ast: (() => { visitor: { Program(node: any): void; ElementNode(node: any): void; }; })[]; }; }' is not assignable to parameter of type 'PreprocessOptions'. Types of property 'plugins' are incompatible. Type '{ ast: (() => { visitor: { Program(node: any): void; ElementNode(node: any): void; }; })[]; }' is not assignable to type '{ ast?: ASTPluginBuilder[] | undefined; }'. From 160a24cd71735956ce7175dd899e4e7f5f3c25fb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 12 Mar 2020 14:31:37 -0700 Subject: [PATCH 2/4] add updates missed from merge --- src/testRunner/unittests/tscWatch/helpers.ts | 2 +- .../unittests/tsserver/cachingFileSystemInformation.ts | 2 +- src/testRunner/unittests/tsserver/projectErrors.ts | 2 +- src/testRunner/unittests/tsserver/resolutionCache.ts | 8 ++++---- src/testRunner/unittests/tsserver/symLinks.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index 5492b5cbfe63b..061fed7cb0af1 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -267,7 +267,7 @@ namespace ts.tscWatch { export function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { const quotedModuleName = `"${moduleName}"`; - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0, moduleName); + return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName); } export type TscWatchCompileChange = ( diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 5e6dc224cfcac..598e6202bce98 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -240,7 +240,7 @@ namespace ts.projectSystem { let diags = project.getLanguageService().getSemanticDiagnostics(root.path); assert.equal(diags.length, 1); const diag = diags[0]; - assert.equal(diag.code, Diagnostics.Cannot_find_module_0.code); + assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code); assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'."); callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path); diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index 2d8822493b03d..53b86448dae39 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -959,7 +959,7 @@ console.log(blabla);` createDiagnostic( span.start, span.end, - Diagnostics.Cannot_find_module_0, + Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, ["@angular/core"] ) ]; diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts index c1f4c755a3a59..d89a739c8d1ca 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -111,7 +111,7 @@ namespace ts.projectSystem { ); let diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); host.reloadFS([file1, moduleFile]); @@ -158,7 +158,7 @@ namespace ts.projectSystem { file: file1, syntax: [], semantic: [ - createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0, ["pad"]) + createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, ["pad"]) ], suggestion: [] }] @@ -342,7 +342,7 @@ namespace ts.projectSystem { host.runQueuedTimeoutCallbacks(); diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); assert.equal(diags.length, 1); @@ -393,7 +393,7 @@ namespace ts.projectSystem { host.runQueuedTimeoutCallbacks(); diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] } + { diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] } ]); moduleFile.path = moduleFileOldPath; diff --git a/src/testRunner/unittests/tsserver/symLinks.ts b/src/testRunner/unittests/tsserver/symLinks.ts index 4576dc90c0792..8d22b240419a9 100644 --- a/src/testRunner/unittests/tsserver/symLinks.ts +++ b/src/testRunner/unittests/tsserver/symLinks.ts @@ -212,7 +212,7 @@ new C();` verifyWatchedFilesAndDirectories(session.testhost, filesInProjectWithUnresolvedModule, watchedDirectoriesWithUnresolvedModule, nonRecursiveWatchedDirectories); const startOffset = recognizersDateTimeSrcFile.content.indexOf('"') + 1; verifyErrors(session, [ - createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0, [moduleName]) + createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, [moduleName]) ]); } From 8ae83d1e292f95ebb545ae9eda3143b2c56ea5ae Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 12 Mar 2020 15:29:54 -0700 Subject: [PATCH 3/4] update more missed baselines --- .../unittests/tsserver/cachingFileSystemInformation.ts | 8 ++++---- ...ypeWithUnparenthesizedGenericFunctionParsed.errors.txt | 4 ++-- ...ropertyAssignmentOnUnresolvedImportedSymbol.errors.txt | 4 ++-- ...ound-with-node-resolution-with-external-module-name.js | 2 +- ...ed-project-should-remove-the-module-not-found-error.js | 2 +- ...k-should-restore-the-states-for-configured-projects.js | 2 +- ...ack-should-restore-the-states-for-inferred-projects.js | 2 +- ...orks-when-included-file-with-ambient-module-changes.js | 2 +- ...ks-when-module-resolution-changes-to-ambient-module.js | 2 +- ..._modules-folder-that-already-contains-@types-folder.js | 2 +- .../with-non-synchronous-watch-directory.js | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 598e6202bce98..601e2fa345151 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -241,7 +241,7 @@ namespace ts.projectSystem { assert.equal(diags.length, 1); const diag = diags[0]; assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code); - assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'."); + assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar' or its corresponding type declarations."); callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path); @@ -474,8 +474,8 @@ namespace ts.projectSystem { const project = service.configuredProjects.get(tsconfig.path)!; checkProjectActualFiles(project, files.map(f => f.path)); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); const debugTypesFile: File = { path: `${projectLocation}/node_modules/debug/index.d.ts`, @@ -682,7 +682,7 @@ namespace ts.projectSystem { const project = service.configuredProjects.get(tsconfig.path)!; checkProjectActualFiles(project, files.map(f => f.path)); - assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]); + assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]); const debugTypesFile: File = { path: `${projectLocation}/node_modules/@types/debug/index.d.ts`, diff --git a/tests/baselines/reference/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt b/tests/baselines/reference/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt index 4c40245d8da55..ea1c54c43d71c 100644 --- a/tests/baselines/reference/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt +++ b/tests/baselines/reference/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module'. +tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module' or its corresponding type declarations. ==== tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts (1 errors) ==== export declare const fail1: import("module").Modifier<(x: T) => T>; // shouldn't be a parse error ~~~~~~~~ -!!! error TS2307: Cannot find module 'module'. \ No newline at end of file +!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. \ No newline at end of file diff --git a/tests/baselines/reference/propertyAssignmentOnUnresolvedImportedSymbol.errors.txt b/tests/baselines/reference/propertyAssignmentOnUnresolvedImportedSymbol.errors.txt index 447285b8328ef..28cdc25e75709 100644 --- a/tests/baselines/reference/propertyAssignmentOnUnresolvedImportedSymbol.errors.txt +++ b/tests/baselines/reference/propertyAssignmentOnUnresolvedImportedSymbol.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/salsa/bug28576.js(1,15): error TS2307: Cannot find module 'arglebaz'. +tests/cases/conformance/salsa/bug28576.js(1,15): error TS2307: Cannot find module 'arglebaz' or its corresponding type declarations. ==== tests/cases/conformance/salsa/bug28576.js (1 errors) ==== import x from 'arglebaz' ~~~~~~~~~~ -!!! error TS2307: Cannot find module 'arglebaz'. +!!! error TS2307: Cannot find module 'arglebaz' or its corresponding type declarations. { x.bar = 1 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js index c2c25e054e7c6..343d896fcc87c 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/initial-build/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js @@ -2,7 +2,7 @@ /lib/tsc --b /src/tsconfig.c.json --listFiles /lib/lib.d.ts /src/a.ts -src/b.ts:1:17 - error TS2307: Cannot find module 'a'. +src/b.ts:1:17 - error TS2307: Cannot find module 'a' or its corresponding type declarations. 1 import {A} from 'a';    ~~~ diff --git a/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js b/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js index 5189293311d59..28536787baa6f 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js +++ b/tests/baselines/reference/tscWatch/programUpdates/add-the-missing-module-file-for-inferred-project-should-remove-the-module-not-found-error.js @@ -28,7 +28,7 @@ Output:: [12:00:13 AM] Starting compilation in watch mode... -a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile'. +a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile' or its corresponding type declarations. 1 import * as T from "./moduleFile"; T.bar();    ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js index 6483755722f58..0a26775551849 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js +++ b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-configured-projects.js @@ -102,7 +102,7 @@ Output:: [12:00:27 AM] File change detected. Starting incremental compilation... -a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile'. +a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile' or its corresponding type declarations. 1 import * as T from "./moduleFile"; T.bar();    ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js index 4d935309ded35..f5074478f1ed7 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js +++ b/tests/baselines/reference/tscWatch/programUpdates/rename-a-module-file-and-rename-back-should-restore-the-states-for-inferred-projects.js @@ -84,7 +84,7 @@ Output:: [12:00:25 AM] File change detected. Starting incremental compilation... -a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile'. +a/b/file1.ts:1:20 - error TS2307: Cannot find module './moduleFile' or its corresponding type declarations. 1 import * as T from "./moduleFile"; T.bar();    ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js index 44d877463a41a..e1ee3c43a7981 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-included-file-with-ambient-module-changes.js @@ -38,7 +38,7 @@ Output:: [12:00:15 AM] Starting compilation in watch mode... -foo.ts:2:21 - error TS2307: Cannot find module 'fs'. +foo.ts:2:21 - error TS2307: Cannot find module 'fs' or its corresponding type declarations. 2 import * as fs from "fs";    ~~~~ diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js index bb10ad2c313ec..63a69f1c92124 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js @@ -26,7 +26,7 @@ Output:: [12:00:13 AM] Starting compilation in watch mode... -foo.ts:1:21 - error TS2307: Cannot find module 'fs'. +foo.ts:1:21 - error TS2307: Cannot find module 'fs' or its corresponding type declarations. 1 import * as fs from "fs";    ~~~~ diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js index d9706b77da03c..5292d5cbd3464 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js @@ -29,7 +29,7 @@ Output:: [12:00:27 AM] Starting compilation in watch mode... -a.ts:1:20 - error TS2307: Cannot find module 'qqq'. +a.ts:1:20 - error TS2307: Cannot find module 'qqq' or its corresponding type declarations. 1 import * as q from "qqq";    ~~~~~ diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js index 7da9878799745..a69d068cc9db5 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js @@ -131,7 +131,7 @@ Output:: [12:00:38 AM] File change detected. Starting incremental compilation... -user/username/projects/myproject/src/file1.ts:1:19 - error TS2307: Cannot find module 'file2'. +user/username/projects/myproject/src/file1.ts:1:19 - error TS2307: Cannot find module 'file2' or its corresponding type declarations. 1 import { x } from "file2";    ~~~~~~~ @@ -180,7 +180,7 @@ Output:: [12:00:43 AM] File change detected. Starting incremental compilation... -user/username/projects/myproject/src/file1.ts:1:19 - error TS2307: Cannot find module 'file2'. +user/username/projects/myproject/src/file1.ts:1:19 - error TS2307: Cannot find module 'file2' or its corresponding type declarations. 1 import { x } from "file2";    ~~~~~~~ From 99a4d6f8bad670549f6b1305d0e7b6f2a5e91b92 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 12 Mar 2020 15:36:51 -0700 Subject: [PATCH 4/4] remove incorrectly re-added test files --- src/testRunner/unittests/tsbuild.ts | 676 - src/testRunner/unittests/tscWatchMode.ts | 3144 ----- .../unittests/tsserverProjectSystem.ts | 10970 ---------------- tests/baselines/reference/user/prettier.log | 104 - 4 files changed, 14894 deletions(-) delete mode 100644 src/testRunner/unittests/tsbuild.ts delete mode 100644 src/testRunner/unittests/tscWatchMode.ts delete mode 100644 src/testRunner/unittests/tsserverProjectSystem.ts delete mode 100644 tests/baselines/reference/user/prettier.log diff --git a/src/testRunner/unittests/tsbuild.ts b/src/testRunner/unittests/tsbuild.ts deleted file mode 100644 index 94f850d0a2b82..0000000000000 --- a/src/testRunner/unittests/tsbuild.ts +++ /dev/null @@ -1,676 +0,0 @@ -namespace ts { - let currentTime = 100; - export namespace Sample1 { - tick(); - const projFs = loadProjectFromDisk("tests/projects/sample1"); - - const allExpectedOutputs = ["/src/tests/index.js", - "/src/core/index.js", "/src/core/index.d.ts", "/src/core/index.d.ts.map", - "/src/logic/index.js", "/src/logic/index.js.map", "/src/logic/index.d.ts"]; - - describe("tsbuild - sanity check of clean build of 'sample1' project", () => { - it("can build the sample project 'sample1' without error", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); - - host.clearDiagnostics(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - - // Check for outputs. Not an exhaustive list - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - }); - - it("builds correctly when outDir is specified", () => { - const fs = projFs.shadow(); - fs.writeFileSync("/src/logic/tsconfig.json", JSON.stringify({ - compilerOptions: { composite: true, declaration: true, sourceMap: true, outDir: "outDir" }, - references: [{ path: "../core" }] - })); - - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], {}); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - const expectedOutputs = allExpectedOutputs.map(f => f.replace("/logic/", "/logic/outDir/")); - // Check for outputs. Not an exhaustive list - for (const output of expectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - }); - - it("builds correctly when declarationDir is specified", () => { - const fs = projFs.shadow(); - fs.writeFileSync("/src/logic/tsconfig.json", JSON.stringify({ - compilerOptions: { composite: true, declaration: true, sourceMap: true, declarationDir: "out/decls" }, - references: [{ path: "../core" }] - })); - - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], {}); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - const expectedOutputs = allExpectedOutputs.map(f => f.replace("/logic/index.d.ts", "/logic/out/decls/index.d.ts")); - // Check for outputs. Not an exhaustive list - for (const output of expectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - }); - }); - - describe("tsbuild - dry builds", () => { - it("doesn't write any files in a dry build", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: true, force: false, verbose: false }); - builder.buildAllProjects(); - host.assertDiagnosticMessages(Diagnostics.A_non_dry_build_would_build_project_0, Diagnostics.A_non_dry_build_would_build_project_0, Diagnostics.A_non_dry_build_would_build_project_0); - - // Check for outputs to not be written. Not an exhaustive list - for (const output of allExpectedOutputs) { - assert(!fs.existsSync(output), `Expect file ${output} to not exist`); - } - }); - - it("indicates that it would skip builds during a dry build", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - - let builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); - builder.buildAllProjects(); - tick(); - - host.clearDiagnostics(); - builder = createSolutionBuilder(host, ["/src/tests"], { dry: true, force: false, verbose: false }); - builder.buildAllProjects(); - host.assertDiagnosticMessages(Diagnostics.Project_0_is_up_to_date, Diagnostics.Project_0_is_up_to_date, Diagnostics.Project_0_is_up_to_date); - }); - }); - - describe("tsbuild - clean builds", () => { - it("removes all files it built", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); - builder.buildAllProjects(); - // Verify they exist - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - builder.cleanAllProjects(); - // Verify they are gone - for (const output of allExpectedOutputs) { - assert(!fs.existsSync(output), `Expect file ${output} to not exist`); - } - // Subsequent clean shouldn't throw / etc - builder.cleanAllProjects(); - }); - }); - - describe("tsbuild - force builds", () => { - it("always builds under --force", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: true, verbose: false }); - builder.buildAllProjects(); - let currentTime = time(); - checkOutputTimestamps(currentTime); - - tick(); - Debug.assert(time() !== currentTime, "Time moves on"); - currentTime = time(); - builder.buildAllProjects(); - checkOutputTimestamps(currentTime); - - function checkOutputTimestamps(expected: number) { - // Check timestamps - for (const output of allExpectedOutputs) { - const actual = fs.statSync(output).mtimeMs; - assert(actual === expected, `File ${output} has timestamp ${actual}, expected ${expected}`); - } - } - }); - }); - - describe("tsbuild - can detect when and what to rebuild", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: true }); - - it("Builds the project", () => { - host.clearDiagnostics(); - builder.resetBuildContext(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(Diagnostics.Projects_in_this_build_Colon_0, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - Diagnostics.Building_project_0, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - Diagnostics.Building_project_0, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - Diagnostics.Building_project_0); - tick(); - }); - - // All three projects are up to date - it("Detects that all projects are up to date", () => { - host.clearDiagnostics(); - builder.resetBuildContext(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(Diagnostics.Projects_in_this_build_Colon_0, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2); - tick(); - }); - - // Update a file in the leaf node (tests), only it should rebuild the last one - it("Only builds the leaf node project", () => { - host.clearDiagnostics(); - fs.writeFileSync("/src/tests/index.ts", "const m = 10;"); - builder.resetBuildContext(); - builder.buildAllProjects(); - - host.assertDiagnosticMessages(Diagnostics.Projects_in_this_build_Colon_0, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, - Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, - Diagnostics.Building_project_0); - tick(); - }); - - // Update a file in the parent (without affecting types), should get fast downstream builds - it("Detects type-only changes in upstream projects", () => { - host.clearDiagnostics(); - replaceText(fs, "/src/core/index.ts", "HELLO WORLD", "WELCOME PLANET"); - builder.resetBuildContext(); - builder.buildAllProjects(); - - host.assertDiagnosticMessages(Diagnostics.Projects_in_this_build_Colon_0, - Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, - Diagnostics.Building_project_0, - Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, - Diagnostics.Updating_output_timestamps_of_project_0, - Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, - Diagnostics.Updating_output_timestamps_of_project_0); - }); - }); - - describe("tsbuild - downstream-blocked compilations", () => { - it("won't build downstream projects if upstream projects have errors", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: true }); - - // Induce an error in the middle project - replaceText(fs, "/src/logic/index.ts", "c.multiply(10, 15)", `c.muitply()`); - builder.buildAllProjects(); - host.assertDiagnosticMessages( - Diagnostics.Projects_in_this_build_Colon_0, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - Diagnostics.Building_project_0, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - Diagnostics.Building_project_0, - Diagnostics.Property_0_does_not_exist_on_type_1, - Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, - Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors - ); - }); - }); - - describe("tsbuild - project invalidation", () => { - it("invalidates projects correctly", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); - - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - - // Update a timestamp in the middle project - tick(); - touch(fs, "/src/logic/index.ts"); - // Because we haven't reset the build context, the builder should assume there's nothing to do right now - const status = builder.getUpToDateStatusOfFile(builder.resolveProjectName("/src/logic")); - assert.equal(status.type, UpToDateStatusType.UpToDate, "Project should be assumed to be up-to-date"); - - // Rebuild this project - tick(); - builder.invalidateProject("/src/logic"); - builder.buildInvalidatedProject(); - // The file should be updated - assert.equal(fs.statSync("/src/logic/index.js").mtimeMs, time(), "JS file should have been rebuilt"); - assert.isBelow(fs.statSync("/src/tests/index.js").mtimeMs, time(), "Downstream JS file should *not* have been rebuilt"); - - // Does not build tests or core because there is no change in declaration file - tick(); - builder.buildInvalidatedProject(); - assert.isBelow(fs.statSync("/src/tests/index.js").mtimeMs, time(), "Downstream JS file should have been rebuilt"); - assert.isBelow(fs.statSync("/src/core/index.js").mtimeMs, time(), "Upstream JS file should not have been rebuilt"); - - // Rebuild this project - tick(); - fs.writeFileSync("/src/logic/index.ts", `${fs.readFileSync("/src/logic/index.ts")} -export class cNew {}`); - builder.invalidateProject("/src/logic"); - builder.buildInvalidatedProject(); - // The file should be updated - assert.equal(fs.statSync("/src/logic/index.js").mtimeMs, time(), "JS file should have been rebuilt"); - assert.isBelow(fs.statSync("/src/tests/index.js").mtimeMs, time(), "Downstream JS file should *not* have been rebuilt"); - - // Build downstream projects should update 'tests', but not 'core' - tick(); - builder.buildInvalidatedProject(); - assert.isBelow(fs.statSync("/src/tests/index.js").mtimeMs, time(), "Downstream JS file should have been rebuilt"); - assert.isBelow(fs.statSync("/src/core/index.js").mtimeMs, time(), "Upstream JS file should not have been rebuilt"); - }); - }); - - describe("tsbuild - with resolveJsonModule option", () => { - const projFs = loadProjectFromDisk("tests/projects/resolveJsonModuleAndComposite"); - const allExpectedOutputs = ["/src/tests/dist/src/index.js", "/src/tests/dist/src/index.d.ts", "/src/tests/dist/src/hello.json"]; - - function verifyProjectWithResolveJsonModule(configFile: string, ...expectedDiagnosticMessages: DiagnosticMessage[]) { - const fs = projFs.shadow(); - verifyProjectWithResolveJsonModuleWithFs(fs, configFile, allExpectedOutputs, ...expectedDiagnosticMessages); - } - - function verifyProjectWithResolveJsonModuleWithFs(fs: vfs.FileSystem, configFile: string, allExpectedOutputs: ReadonlyArray, ...expectedDiagnosticMessages: DiagnosticMessage[]) { - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, [configFile], { dry: false, force: false, verbose: false }); - builder.buildAllProjects(); - host.assertDiagnosticMessages(...expectedDiagnosticMessages); - if (!expectedDiagnosticMessages.length) { - // Check for outputs. Not an exhaustive list - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - } - } - - it("with resolveJsonModule and include only", () => { - verifyProjectWithResolveJsonModule("/src/tests/tsconfig_withInclude.json", Diagnostics.File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern); - }); - - it("with resolveJsonModule and include of *.json along with other include", () => { - verifyProjectWithResolveJsonModule("/src/tests/tsconfig_withIncludeOfJson.json"); - }); - - it("with resolveJsonModule and include of *.json along with other include and file name matches ts file", () => { - const fs = projFs.shadow(); - fs.rimrafSync("/src/tests/src/hello.json"); - fs.writeFileSync("/src/tests/src/index.json", JSON.stringify({ hello: "world" })); - fs.writeFileSync("/src/tests/src/index.ts", `import hello from "./index.json" - -export default hello.hello`); - const allExpectedOutputs = ["/src/tests/dist/src/index.js", "/src/tests/dist/src/index.d.ts", "/src/tests/dist/src/index.json"]; - verifyProjectWithResolveJsonModuleWithFs(fs, "/src/tests/tsconfig_withIncludeOfJson.json", allExpectedOutputs); - }); - - it("with resolveJsonModule and files containing json file", () => { - verifyProjectWithResolveJsonModule("/src/tests/tsconfig_withFiles.json"); - }); - - it("with resolveJsonModule and include and files", () => { - verifyProjectWithResolveJsonModule("/src/tests/tsconfig_withIncludeAndFiles.json"); - }); - }); - - describe("tsbuild - lists files", () => { - it("listFiles", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { listFiles: true }); - builder.buildAllProjects(); - assert.deepEqual(host.traces, [ - ...getLibs(), - "/src/core/anotherModule.ts", - "/src/core/index.ts", - "/src/core/some_decl.d.ts", - ...getLibs(), - ...getCoreOutputs(), - "/src/logic/index.ts", - ...getLibs(), - ...getCoreOutputs(), - "/src/logic/index.d.ts", - "/src/tests/index.ts" - ]); - - function getCoreOutputs() { - return [ - "/src/core/index.d.ts", - "/src/core/anotherModule.d.ts" - ]; - } - }); - - it("listEmittedFiles", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/tests"], { listEmittedFiles: true }); - builder.buildAllProjects(); - assert.deepEqual(host.traces, [ - "TSFILE: /src/core/anotherModule.js", - "TSFILE: /src/core/anotherModule.d.ts", - "TSFILE: /src/core/anotherModule.d.ts.map", - "TSFILE: /src/core/index.js", - "TSFILE: /src/core/index.d.ts", - "TSFILE: /src/core/index.d.ts.map", - "TSFILE: /src/logic/index.js", - "TSFILE: /src/logic/index.js.map", - "TSFILE: /src/logic/index.d.ts", - "TSFILE: /src/tests/index.js", - "TSFILE: /src/tests/index.d.ts", - ]); - }); - }); - - describe("tsbuild - with rootDir of project reference in parentDirectory", () => { - const projFs = loadProjectFromDisk("tests/projects/projectReferenceWithRootDirInParent"); - const allExpectedOutputs = [ - "/src/dist/other/other.js", "/src/dist/other/other.d.ts", - "/src/dist/main/a.js", "/src/dist/main/a.d.ts", - "/src/dist/main/b.js", "/src/dist/main/b.d.ts" - ]; - it("verify that it builds correctly", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/src/main", "/src/src/other"], {}); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - }); - }); - - describe("tsbuild - when project reference is referenced transitively", () => { - const projFs = loadProjectFromDisk("tests/projects/transitiveReferences"); - const allExpectedOutputs = [ - "/src/a.js", "/src/a.d.ts", - "/src/b.js", "/src/b.d.ts", - "/src/c.js" - ]; - const expectedFileTraces = [ - ...getLibs(), - "/src/a.ts", - ...getLibs(), - "/src/a.d.ts", - "/src/b.ts", - ...getLibs(), - "/src/a.d.ts", - "/src/b.d.ts", - "/src/refs/a.d.ts", - "/src/c.ts" - ]; - - function verifyBuild(modifyDiskLayout: (fs: vfs.FileSystem) => void, allExpectedOutputs: ReadonlyArray, expectedDiagnostics: DiagnosticMessage[], expectedFileTraces: ReadonlyArray) { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - modifyDiskLayout(fs); - const builder = createSolutionBuilder(host, ["/src/tsconfig.c.json"], { listFiles: true }); - builder.buildAllProjects(); - host.assertDiagnosticMessages(...expectedDiagnostics); - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - assert.deepEqual(host.traces, expectedFileTraces); - } - - function modifyFsBTsToNonRelativeImport(fs: vfs.FileSystem, moduleResolution: "node" | "classic") { - fs.writeFileSync("/src/b.ts", `import {A} from 'a'; -export const b = new A();`); - fs.writeFileSync("/src/tsconfig.b.json", JSON.stringify({ - compilerOptions: { - composite: true, - moduleResolution - }, - files: ["b.ts"], - references: [{ path: "tsconfig.a.json" }] - })); - } - - it("verify that it builds correctly", () => { - verifyBuild(noop, allExpectedOutputs, emptyArray, expectedFileTraces); - }); - - it("verify that it builds correctly when the referenced project uses different module resolution", () => { - verifyBuild(fs => modifyFsBTsToNonRelativeImport(fs, "classic"), allExpectedOutputs, emptyArray, expectedFileTraces); - }); - - it("verify that it build reports error about module not found with node resolution with external module name", () => { - // Error in b build only a - const allExpectedOutputs = ["/src/a.js", "/src/a.d.ts"]; - const expectedFileTraces = [ - ...getLibs(), - "/src/a.ts", - ]; - verifyBuild(fs => modifyFsBTsToNonRelativeImport(fs, "node"), - allExpectedOutputs, - [Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations], - expectedFileTraces); - }); - }); - } - - export namespace OutFile { - const outFileFs = loadProjectFromDisk("tests/projects/outfile-concat"); - - describe("tsbuild - baseline sectioned sourcemaps", () => { - let fs: vfs.FileSystem | undefined; - before(() => { - fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/third"], { dry: false, force: false, verbose: false }); - host.clearDiagnostics(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*none*/); - }); - after(() => { - fs = undefined; - }); - it(`Generates files matching the baseline`, () => { - const patch = fs!.diff(); - // tslint:disable-next-line:no-null-keyword - Harness.Baseline.runBaseline("outfile-concat.js", patch ? vfs.formatPatch(patch) : null); - }); - }); - - describe("tsbuild - downstream prepend projects always get rebuilt", () => { - it("", () => { - const fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/third"], { dry: false, force: false, verbose: false }); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*none*/); - assert.equal(fs.statSync("src/third/thirdjs/output/third-output.js").mtimeMs, time(), "First build timestamp is correct"); - tick(); - replaceText(fs, "src/first/first_PART1.ts", "Hello", "Hola"); - tick(); - builder.resetBuildContext(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*none*/); - assert.equal(fs.statSync("src/third/thirdjs/output/third-output.js").mtimeMs, time(), "Second build timestamp is correct"); - }); - }); - } - - export namespace EmptyFiles { - const projFs = loadProjectFromDisk("tests/projects/empty-files"); - - const allExpectedOutputs = [ - "/src/core/index.js", - "/src/core/index.d.ts", - "/src/core/index.d.ts.map", - ]; - - describe("tsbuild - empty files option in tsconfig", () => { - it("has empty files diagnostic when files is empty and no references are provided", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/no-references"], { dry: false, force: false, verbose: false }); - - host.clearDiagnostics(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(Diagnostics.The_files_list_in_config_file_0_is_empty); - - // Check for outputs to not be written. - for (const output of allExpectedOutputs) { - assert(!fs.existsSync(output), `Expect file ${output} to not exist`); - } - }); - - it("does not have empty files diagnostic when files is empty and references are provided", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, ["/src/with-references"], { dry: false, force: false, verbose: false }); - - host.clearDiagnostics(); - builder.buildAllProjects(); - host.assertDiagnosticMessages(/*empty*/); - - // Check for outputs to be written. - for (const output of allExpectedOutputs) { - assert(fs.existsSync(output), `Expect file ${output} to exist`); - } - }); - }); - } - - describe("tsbuild - graph-ordering", () => { - let host: fakes.SolutionBuilderHost | undefined; - const deps: [string, string][] = [ - ["A", "B"], - ["B", "C"], - ["A", "C"], - ["B", "D"], - ["C", "D"], - ["C", "E"], - ["F", "E"] - ]; - - before(() => { - const fs = new vfs.FileSystem(false); - host = new fakes.SolutionBuilderHost(fs); - writeProjects(fs, ["A", "B", "C", "D", "E", "F", "G"], deps); - }); - - after(() => { - host = undefined; - }); - - it("orders the graph correctly - specify two roots", () => { - checkGraphOrdering(["A", "G"], ["A", "B", "C", "D", "E", "G"]); - }); - - it("orders the graph correctly - multiple parts of the same graph in various orders", () => { - checkGraphOrdering(["A"], ["A", "B", "C", "D", "E"]); - checkGraphOrdering(["A", "C", "D"], ["A", "B", "C", "D", "E"]); - checkGraphOrdering(["D", "C", "A"], ["A", "B", "C", "D", "E"]); - }); - - it("orders the graph correctly - other orderings", () => { - checkGraphOrdering(["F"], ["F", "E"]); - checkGraphOrdering(["E"], ["E"]); - checkGraphOrdering(["F", "C", "A"], ["A", "B", "C", "D", "E", "F"]); - }); - - function checkGraphOrdering(rootNames: string[], expectedBuildSet: string[]) { - const builder = createSolutionBuilder(host!, rootNames, { dry: true, force: false, verbose: false }); - - const projFileNames = rootNames.map(getProjectFileName); - const graph = builder.getBuildGraph(projFileNames); - - assert.sameMembers(graph.buildQueue, expectedBuildSet.map(getProjectFileName)); - - for (const dep of deps) { - const child = getProjectFileName(dep[0]); - if (graph.buildQueue.indexOf(child) < 0) continue; - const parent = getProjectFileName(dep[1]); - assert.isAbove(graph.buildQueue.indexOf(child), graph.buildQueue.indexOf(parent), `Expecting child ${child} to be built after parent ${parent}`); - } - } - - function getProjectFileName(proj: string) { - return `/project/${proj}/tsconfig.json` as ResolvedConfigFileName; - } - - function writeProjects(fileSystem: vfs.FileSystem, projectNames: string[], deps: [string, string][]): string[] { - const projFileNames: string[] = []; - for (const dep of deps) { - if (projectNames.indexOf(dep[0]) < 0) throw new Error(`Invalid dependency - project ${dep[0]} does not exist`); - if (projectNames.indexOf(dep[1]) < 0) throw new Error(`Invalid dependency - project ${dep[1]} does not exist`); - } - for (const proj of projectNames) { - fileSystem.mkdirpSync(`/project/${proj}`); - fileSystem.writeFileSync(`/project/${proj}/${proj}.ts`, "export {}"); - const configFileName = getProjectFileName(proj); - const configContent = JSON.stringify({ - compilerOptions: { composite: true }, - files: [`./${proj}.ts`], - references: deps.filter(d => d[0] === proj).map(d => ({ path: `../${d[1]}` })) - }, undefined, 2); - fileSystem.writeFileSync(configFileName, configContent); - projFileNames.push(configFileName); - } - return projFileNames; - } - }); - - - function replaceText(fs: vfs.FileSystem, path: string, oldText: string, newText: string) { - if (!fs.statSync(path).isFile()) { - throw new Error(`File ${path} does not exist`); - } - const old = fs.readFileSync(path, "utf-8"); - if (old.indexOf(oldText) < 0) { - throw new Error(`Text "${oldText}" does not exist in file ${path}`); - } - const newContent = old.replace(oldText, newText); - fs.writeFileSync(path, newContent, "utf-8"); - } - - function tick() { - currentTime += 60_000; - } - - function time() { - return currentTime; - } - - function touch(fs: vfs.FileSystem, path: string) { - if (!fs.statSync(path).isFile()) { - throw new Error(`File ${path} does not exist`); - } - fs.utimesSync(path, new Date(time()), new Date(time())); - } - - function loadProjectFromDisk(root: string): vfs.FileSystem { - const resolver = vfs.createResolver(Harness.IO); - const fs = new vfs.FileSystem(/*ignoreCase*/ true, { - files: { - ["/lib"]: new vfs.Mount(vpath.resolve(Harness.IO.getWorkspaceRoot(), "built/local"), resolver), - ["/src"]: new vfs.Mount(vpath.resolve(Harness.IO.getWorkspaceRoot(), root), resolver) - }, - cwd: "/", - meta: { defaultLibLocation: "/lib" }, - time - }); - fs.makeReadonly(); - return fs; - } - - function getLibs() { - return [ - "/lib/lib.d.ts", - "/lib/lib.es5.d.ts", - "/lib/lib.dom.d.ts", - "/lib/lib.webworker.importscripts.d.ts", - "/lib/lib.scripthost.d.ts" - ]; - } -} diff --git a/src/testRunner/unittests/tscWatchMode.ts b/src/testRunner/unittests/tscWatchMode.ts deleted file mode 100644 index bc82fe21207c6..0000000000000 --- a/src/testRunner/unittests/tscWatchMode.ts +++ /dev/null @@ -1,3144 +0,0 @@ -namespace ts.tscWatch { - export import WatchedSystem = TestFSWithWatch.TestServerHost; - export type File = TestFSWithWatch.File; - export type SymLink = TestFSWithWatch.SymLink; - export import createWatchedSystem = TestFSWithWatch.createWatchedSystem; - export import checkArray = TestFSWithWatch.checkArray; - export import checkWatchedFiles = TestFSWithWatch.checkWatchedFiles; - export import checkWatchedFilesDetailed = TestFSWithWatch.checkWatchedFilesDetailed; - export import checkWatchedDirectories = TestFSWithWatch.checkWatchedDirectories; - export import checkWatchedDirectoriesDetailed = TestFSWithWatch.checkWatchedDirectoriesDetailed; - export import checkOutputContains = TestFSWithWatch.checkOutputContains; - export import checkOutputDoesNotContain = TestFSWithWatch.checkOutputDoesNotContain; - export import Tsc_WatchDirectory = TestFSWithWatch.Tsc_WatchDirectory; - - export function checkProgramActualFiles(program: Program, expectedFiles: ReadonlyArray) { - checkArray(`Program actual files`, program.getSourceFiles().map(file => file.fileName), expectedFiles); - } - - export function checkProgramRootFiles(program: Program, expectedFiles: ReadonlyArray) { - checkArray(`Program rootFileNames`, program.getRootFileNames(), expectedFiles); - } - - export function createWatchOfConfigFileReturningBuilder(configFileName: string, host: WatchedSystem, maxNumberOfFilesToIterateForInvalidation?: number) { - const compilerHost = createWatchCompilerHostOfConfigFile(configFileName, {}, host); - compilerHost.maxNumberOfFilesToIterateForInvalidation = maxNumberOfFilesToIterateForInvalidation; - const watch = createWatchProgram(compilerHost); - return () => watch.getCurrentProgram(); - } - - export function createWatchOfConfigFile(configFileName: string, host: WatchedSystem, maxNumberOfFilesToIterateForInvalidation?: number) { - const compilerHost = createWatchCompilerHostOfConfigFile(configFileName, {}, host); - compilerHost.maxNumberOfFilesToIterateForInvalidation = maxNumberOfFilesToIterateForInvalidation; - const watch = createWatchProgram(compilerHost); - return () => watch.getCurrentProgram().getProgram(); - } - - function createWatchOfFilesAndCompilerOptions(rootFiles: string[], host: WatchedSystem, options: CompilerOptions = {}, maxNumberOfFilesToIterateForInvalidation?: number) { - const compilerHost = createWatchCompilerHostOfFilesAndCompilerOptions(rootFiles, options, host); - compilerHost.maxNumberOfFilesToIterateForInvalidation = maxNumberOfFilesToIterateForInvalidation; - const watch = createWatchProgram(compilerHost); - return () => watch.getCurrentProgram().getProgram(); - } - - function getEmittedLineForMultiFileOutput(file: File, host: WatchedSystem) { - return `TSFILE: ${file.path.replace(".ts", ".js")}${host.newLine}`; - } - - function getEmittedLineForSingleFileOutput(filename: string, host: WatchedSystem) { - return `TSFILE: ${filename}${host.newLine}`; - } - - interface FileOrFolderEmit extends File { - output?: string; - } - - function getFileOrFolderEmit(file: File, getOutput?: (file: File) => string): FileOrFolderEmit { - const result = file as FileOrFolderEmit; - if (getOutput) { - result.output = getOutput(file); - } - return result; - } - - function getEmittedLines(files: FileOrFolderEmit[]) { - const seen = createMap(); - const result: string[] = []; - for (const { output } of files) { - if (output && !seen.has(output)) { - seen.set(output, true); - result.push(output); - } - } - return result; - } - - function checkAffectedLines(host: WatchedSystem, affectedFiles: FileOrFolderEmit[], allEmittedFiles: string[]) { - const expectedAffectedFiles = getEmittedLines(affectedFiles); - const expectedNonAffectedFiles = mapDefined(allEmittedFiles, line => contains(expectedAffectedFiles, line) ? undefined : line); - checkOutputContains(host, expectedAffectedFiles); - checkOutputDoesNotContain(host, expectedNonAffectedFiles); - } - - const elapsedRegex = /^Elapsed:: [0-9]+ms/; - function checkOutputErrors( - host: WatchedSystem, - logsBeforeWatchDiagnostic: string[] | undefined, - preErrorsWatchDiagnostic: Diagnostic, - logsBeforeErrors: string[] | undefined, - errors: ReadonlyArray | ReadonlyArray, - disableConsoleClears?: boolean | undefined, - ...postErrorsWatchDiagnostics: Diagnostic[] - ) { - let screenClears = 0; - const outputs = host.getOutput(); - const expectedOutputCount = 1 + errors.length + postErrorsWatchDiagnostics.length + - (logsBeforeWatchDiagnostic ? logsBeforeWatchDiagnostic.length : 0) + (logsBeforeErrors ? logsBeforeErrors.length : 0); - assert.equal(outputs.length, expectedOutputCount, JSON.stringify(outputs)); - let index = 0; - forEach(logsBeforeWatchDiagnostic, log => assertLog("logsBeforeWatchDiagnostic", log)); - assertWatchDiagnostic(preErrorsWatchDiagnostic); - forEach(logsBeforeErrors, log => assertLog("logBeforeError", log)); - // Verify errors - forEach(errors, assertDiagnostic); - forEach(postErrorsWatchDiagnostics, assertWatchDiagnostic); - assert.equal(host.screenClears.length, screenClears, "Expected number of screen clears"); - host.clearOutput(); - - function isDiagnostic(diagnostic: Diagnostic | string): diagnostic is Diagnostic { - return !!(diagnostic as Diagnostic).messageText; - } - - function assertDiagnostic(diagnostic: Diagnostic | string) { - const expected = isDiagnostic(diagnostic) ? formatDiagnostic(diagnostic, host) : diagnostic; - assert.equal(outputs[index], expected, getOutputAtFailedMessage("Diagnostic", expected)); - index++; - } - - function assertLog(caption: string, expected: string) { - const actual = outputs[index]; - assert.equal(actual.replace(elapsedRegex, ""), expected.replace(elapsedRegex, ""), getOutputAtFailedMessage(caption, expected)); - index++; - } - - function assertWatchDiagnostic(diagnostic: Diagnostic) { - const expected = getWatchDiagnosticWithoutDate(diagnostic); - if (!disableConsoleClears && contains(screenStartingMessageCodes, diagnostic.code)) { - assert.equal(host.screenClears[screenClears], index, `Expected screen clear at this diagnostic: ${expected}`); - screenClears++; - } - assert.isTrue(endsWith(outputs[index], expected), getOutputAtFailedMessage("Watch diagnostic", expected)); - index++; - } - - function getOutputAtFailedMessage(caption: string, expectedOutput: string) { - return `Expected ${caption}: ${JSON.stringify(expectedOutput)} at ${index} in ${JSON.stringify(outputs)}`; - } - - function getWatchDiagnosticWithoutDate(diagnostic: Diagnostic) { - const newLines = contains(screenStartingMessageCodes, diagnostic.code) - ? `${host.newLine}${host.newLine}` - : host.newLine; - return ` - ${flattenDiagnosticMessageText(diagnostic.messageText, host.newLine)}${newLines}`; - } - } - - function createErrorsFoundCompilerDiagnostic(errors: ReadonlyArray | ReadonlyArray) { - return errors.length === 1 - ? createCompilerDiagnostic(Diagnostics.Found_1_error_Watching_for_file_changes) - : createCompilerDiagnostic(Diagnostics.Found_0_errors_Watching_for_file_changes, errors.length); - } - - export function checkOutputErrorsInitial(host: WatchedSystem, errors: ReadonlyArray | ReadonlyArray, disableConsoleClears?: boolean, logsBeforeErrors?: string[]) { - checkOutputErrors( - host, - /*logsBeforeWatchDiagnostic*/ undefined, - createCompilerDiagnostic(Diagnostics.Starting_compilation_in_watch_mode), - logsBeforeErrors, - errors, - disableConsoleClears, - createErrorsFoundCompilerDiagnostic(errors)); - } - - export function checkOutputErrorsIncremental(host: WatchedSystem, errors: ReadonlyArray | ReadonlyArray, disableConsoleClears?: boolean, logsBeforeWatchDiagnostic?: string[], logsBeforeErrors?: string[]) { - checkOutputErrors( - host, - logsBeforeWatchDiagnostic, - createCompilerDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation), - logsBeforeErrors, - errors, - disableConsoleClears, - createErrorsFoundCompilerDiagnostic(errors)); - } - - function checkOutputErrorsIncrementalWithExit(host: WatchedSystem, errors: ReadonlyArray | ReadonlyArray, expectedExitCode: ExitStatus, disableConsoleClears?: boolean, logsBeforeWatchDiagnostic?: string[], logsBeforeErrors?: string[]) { - checkOutputErrors( - host, - logsBeforeWatchDiagnostic, - createCompilerDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation), - logsBeforeErrors, - errors, - disableConsoleClears); - assert.equal(host.exitCode, expectedExitCode); - } - - function getDiagnosticOfFileFrom(file: SourceFile | undefined, text: string, start: number | undefined, length: number | undefined, message: DiagnosticMessage): Diagnostic { - return { - file, - start, - length, - - messageText: text, - category: message.category, - code: message.code, - }; - } - - function getDiagnosticWithoutFile(message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); - } - - return getDiagnosticOfFileFrom(/*file*/ undefined, text, /*start*/ undefined, /*length*/ undefined, message); - } - - function getDiagnosticOfFile(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - - return getDiagnosticOfFileFrom(file, text, start, length, message); - } - - function getUnknownCompilerOption(program: Program, configFile: File, option: string) { - const quotedOption = `"${option}"`; - return getDiagnosticOfFile(program.getCompilerOptions().configFile!, configFile.content.indexOf(quotedOption), quotedOption.length, Diagnostics.Unknown_compiler_option_0, option); - } - - function getDiagnosticOfFileFromProgram(program: Program, filePath: string, start: number, length: number, message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { - let text = getLocaleSpecificMessage(message); - - if (arguments.length > 5) { - text = formatStringFromArgs(text, arguments, 5); - } - - return getDiagnosticOfFileFrom(program.getSourceFileByPath(toPath(filePath, program.getCurrentDirectory(), s => s.toLowerCase()))!, - text, start, length, message); - } - - function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { - const quotedModuleName = `"${moduleName}"`; - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName); - } - - describe("tsc-watch program updates", () => { - const commonFile1: File = { - path: "/a/b/commonFile1.ts", - content: "let x = 1" - }; - const commonFile2: File = { - path: "/a/b/commonFile2.ts", - content: "let y = 1" - }; - - it("create watch without config file", () => { - const appFile: File = { - path: "/a/b/c/app.ts", - content: ` - import {f} from "./module" - console.log(f) - ` - }; - - const moduleFile: File = { - path: "/a/b/c/module.d.ts", - content: `export let x: number` - }; - const host = createWatchedSystem([appFile, moduleFile, libFile]); - const watch = createWatchOfFilesAndCompilerOptions([appFile.path], host); - - checkProgramActualFiles(watch(), [appFile.path, libFile.path, moduleFile.path]); - - // TODO: Should we watch creation of config files in the root file's file hierarchy? - - // const configFileLocations = ["/a/b/c/", "/a/b/", "/a/", "/"]; - // const configFiles = flatMap(configFileLocations, location => [location + "tsconfig.json", location + "jsconfig.json"]); - // checkWatchedFiles(host, configFiles.concat(libFile.path, moduleFile.path)); - }); - - it("can handle tsconfig file name with difference casing", () => { - const f1 = { - path: "/a/b/app.ts", - content: "let x = 1" - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ - include: ["app.ts"] - }) - }; - - const host = createWatchedSystem([f1, config], { useCaseSensitiveFileNames: false }); - const upperCaseConfigFilePath = combinePaths(getDirectoryPath(config.path).toUpperCase(), getBaseFileName(config.path)); - const watch = createWatchOfConfigFile(upperCaseConfigFilePath, host); - checkProgramActualFiles(watch(), [combinePaths(getDirectoryPath(upperCaseConfigFilePath), getBaseFileName(f1.path))]); - }); - - it("create configured project without file list", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: ` - { - "compilerOptions": {}, - "exclude": [ - "e" - ] - }` - }; - const file1: File = { - path: "/a/b/c/f1.ts", - content: "let x = 1" - }; - const file2: File = { - path: "/a/b/d/f2.ts", - content: "let y = 1" - }; - const file3: File = { - path: "/a/b/e/f3.ts", - content: "let z = 1" - }; - - const host = createWatchedSystem([configFile, libFile, file1, file2, file3]); - const watch = createWatchProgram(createWatchCompilerHostOfConfigFile(configFile.path, {}, host, /*createProgram*/ undefined, notImplemented)); - - checkProgramActualFiles(watch.getCurrentProgram().getProgram(), [file1.path, libFile.path, file2.path]); - checkProgramRootFiles(watch.getCurrentProgram().getProgram(), [file1.path, file2.path]); - checkWatchedFiles(host, [configFile.path, file1.path, file2.path, libFile.path]); - const configDir = getDirectoryPath(configFile.path); - checkWatchedDirectories(host, [configDir, combinePaths(configDir, projectSystem.nodeModulesAtTypes)], /*recursive*/ true); - }); - - // TODO: if watching for config file creation - // it("add and then remove a config file in a folder with loose files", () => { - // }); - - it("add new files to a configured program without file list", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{}` - }; - const host = createWatchedSystem([commonFile1, libFile, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - const configDir = getDirectoryPath(configFile.path); - checkWatchedDirectories(host, [configDir, combinePaths(configDir, projectSystem.nodeModulesAtTypes)], /*recursive*/ true); - - checkProgramRootFiles(watch(), [commonFile1.path]); - - // add a new ts file - host.reloadFS([commonFile1, commonFile2, libFile, configFile]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - }); - - it("should ignore non-existing files specified in the config file", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "files": [ - "commonFile1.ts", - "commonFile3.ts" - ] - }` - }; - const host = createWatchedSystem([commonFile1, commonFile2, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - - const commonFile3 = "/a/b/commonFile3.ts"; - checkProgramRootFiles(watch(), [commonFile1.path, commonFile3]); - checkProgramActualFiles(watch(), [commonFile1.path]); - }); - - it("handle recreated files correctly", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{}` - }; - const host = createWatchedSystem([commonFile1, commonFile2, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - - // delete commonFile2 - host.reloadFS([commonFile1, configFile]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [commonFile1.path]); - - // re-add commonFile2 - host.reloadFS([commonFile1, commonFile2, configFile]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - }); - - it("handles the missing files - that were added to program because they were added with /// { - const commonFile2Name = "commonFile2.ts"; - const file1: File = { - path: "/a/b/commonFile1.ts", - content: `/// - let x = y` - }; - const host = createWatchedSystem([file1, libFile]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, libFile.path]); - checkOutputErrorsInitial(host, [ - getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf(commonFile2Name), commonFile2Name.length, Diagnostics.File_0_not_found, commonFile2.path), - getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf("y"), 1, Diagnostics.Cannot_find_name_0, "y") - ]); - - host.reloadFS([file1, commonFile2, libFile]); - host.runQueuedTimeoutCallbacks(); - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, libFile.path, commonFile2.path]); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("should reflect change in config file", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "files": ["${commonFile1.path}", "${commonFile2.path}"] - }` - }; - const files = [commonFile1, commonFile2, configFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - configFile.content = `{ - "compilerOptions": {}, - "files": ["${commonFile1.path}"] - }`; - - host.reloadFS(files); - host.checkTimeoutQueueLengthAndRun(1); // reload the configured project - checkProgramRootFiles(watch(), [commonFile1.path]); - }); - - it("works correctly when config file is changed but its content havent", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "files": ["${commonFile1.path}", "${commonFile2.path}"] - }` - }; - const files = [libFile, commonFile1, commonFile2, configFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramActualFiles(watch(), [libFile.path, commonFile1.path, commonFile2.path]); - checkOutputErrorsInitial(host, emptyArray); - - host.modifyFile(configFile.path, configFile.content); - host.checkTimeoutQueueLengthAndRun(1); // reload the configured project - - checkProgramActualFiles(watch(), [libFile.path, commonFile1.path, commonFile2.path]); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("Updates diagnostics when '--noUnusedLabels' changes", () => { - const aTs: File = { path: "/a.ts", content: "label: while (1) {}" }; - const files = [libFile, aTs]; - const paths = files.map(f => f.path); - const options = (allowUnusedLabels: boolean) => `{ "compilerOptions": { "allowUnusedLabels": ${allowUnusedLabels} } }`; - const tsconfig: File = { path: "/tsconfig.json", content: options(/*allowUnusedLabels*/ true) }; - - const host = createWatchedSystem([...files, tsconfig]); - const watch = createWatchOfConfigFile(tsconfig.path, host); - - checkProgramActualFiles(watch(), paths); - checkOutputErrorsInitial(host, emptyArray); - - host.modifyFile(tsconfig.path, options(/*allowUnusedLabels*/ false)); - host.checkTimeoutQueueLengthAndRun(1); // reload the configured project - - checkProgramActualFiles(watch(), paths); - checkOutputErrorsIncremental(host, [ - getDiagnosticOfFileFromProgram(watch(), aTs.path, 0, "label".length, Diagnostics.Unused_label), - ]); - - host.modifyFile(tsconfig.path, options(/*allowUnusedLabels*/ true)); - host.checkTimeoutQueueLengthAndRun(1); // reload the configured project - checkProgramActualFiles(watch(), paths); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("files explicitly excluded in config file", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "exclude": ["/a/c"] - }` - }; - const excludedFile1: File = { - path: "/a/c/excluedFile1.ts", - content: `let t = 1;` - }; - - const host = createWatchedSystem([commonFile1, commonFile2, excludedFile1, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - }); - - it("should properly handle module resolution changes in config file", () => { - const file1: File = { - path: "/a/b/file1.ts", - content: `import { T } from "module1";` - }; - const nodeModuleFile: File = { - path: "/a/b/node_modules/module1.ts", - content: `export interface T {}` - }; - const classicModuleFile: File = { - path: "/a/module1.ts", - content: `export interface T {}` - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "moduleResolution": "node" - }, - "files": ["${file1.path}"] - }` - }; - const files = [file1, nodeModuleFile, classicModuleFile, configFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, nodeModuleFile.path]); - - configFile.content = `{ - "compilerOptions": { - "moduleResolution": "classic" - }, - "files": ["${file1.path}"] - }`; - host.reloadFS(files); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, classicModuleFile.path]); - }); - - it("should tolerate config file errors and still try to build a project", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6", - "allowAnything": true - }, - "someOtherProperty": {} - }` - }; - const host = createWatchedSystem([commonFile1, commonFile2, libFile, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramRootFiles(watch(), [commonFile1.path, commonFile2.path]); - }); - - it("changes in files are reflected in project structure", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: `export let x = 1` - }; - const file3 = { - path: "/a/c/f3.ts", - content: `export let y = 1;` - }; - const host = createWatchedSystem([file1, file2, file3]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, file2.path]); - - const modifiedFile2 = { - path: file2.path, - content: `export * from "../c/f3"` // now inferred project should inclule file3 - }; - - host.reloadFS([file1, modifiedFile2, file3]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [file1.path]); - checkProgramActualFiles(watch(), [file1.path, modifiedFile2.path, file3.path]); - }); - - it("deleted files affect project structure", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: `export * from "../c/f3"` - }; - const file3 = { - path: "/a/c/f3.ts", - content: `export let y = 1;` - }; - const host = createWatchedSystem([file1, file2, file3]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - checkProgramActualFiles(watch(), [file1.path, file2.path, file3.path]); - - host.reloadFS([file1, file3]); - host.checkTimeoutQueueLengthAndRun(1); - - checkProgramActualFiles(watch(), [file1.path]); - }); - - it("deleted files affect project structure - 2", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: `export * from "../c/f3"` - }; - const file3 = { - path: "/a/c/f3.ts", - content: `export let y = 1;` - }; - const host = createWatchedSystem([file1, file2, file3]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path, file3.path], host); - checkProgramActualFiles(watch(), [file1.path, file2.path, file3.path]); - - host.reloadFS([file1, file3]); - host.checkTimeoutQueueLengthAndRun(1); - - checkProgramActualFiles(watch(), [file1.path, file3.path]); - }); - - it("config file includes the file", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "export let x = 5" - }; - const file2 = { - path: "/a/c/f2.ts", - content: `import {x} from "../b/f1"` - }; - const file3 = { - path: "/a/c/f3.ts", - content: "export let y = 1" - }; - const configFile = { - path: "/a/c/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f2.ts", "f3.ts"] }) - }; - - const host = createWatchedSystem([file1, file2, file3, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramRootFiles(watch(), [file2.path, file3.path]); - checkProgramActualFiles(watch(), [file1.path, file2.path, file3.path]); - }); - - it("correctly migrate files between projects", () => { - const file1 = { - path: "/a/b/f1.ts", - content: ` - export * from "../c/f2"; - export * from "../d/f3";` - }; - const file2 = { - path: "/a/c/f2.ts", - content: "export let x = 1;" - }; - const file3 = { - path: "/a/d/f3.ts", - content: "export let y = 1;" - }; - const host = createWatchedSystem([file1, file2, file3]); - const watch = createWatchOfFilesAndCompilerOptions([file2.path, file3.path], host); - checkProgramActualFiles(watch(), [file2.path, file3.path]); - - const watch2 = createWatchOfFilesAndCompilerOptions([file1.path], host); - checkProgramActualFiles(watch2(), [file1.path, file2.path, file3.path]); - - // Previous program shouldnt be updated - checkProgramActualFiles(watch(), [file2.path, file3.path]); - host.checkTimeoutQueueLength(0); - }); - - it("can correctly update configured project when set of root files has changed (new file on disk)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - - const host = createWatchedSystem([file1, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramActualFiles(watch(), [file1.path]); - - host.reloadFS([file1, file2, configFile]); - host.checkTimeoutQueueLengthAndRun(1); - - checkProgramActualFiles(watch(), [file1.path, file2.path]); - checkProgramRootFiles(watch(), [file1.path, file2.path]); - }); - - it("can correctly update configured project when set of root files has changed (new file in list of files)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts"] }) - }; - - const host = createWatchedSystem([file1, file2, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramActualFiles(watch(), [file1.path]); - - const modifiedConfigFile = { - path: configFile.path, - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts", "f2.ts"] }) - }; - - host.reloadFS([file1, file2, modifiedConfigFile]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [file1.path, file2.path]); - checkProgramActualFiles(watch(), [file1.path, file2.path]); - }); - - it("can update configured project when set of root files was not changed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts", "f2.ts"] }) - }; - - const host = createWatchedSystem([file1, file2, configFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramActualFiles(watch(), [file1.path, file2.path]); - - const modifiedConfigFile = { - path: configFile.path, - content: JSON.stringify({ compilerOptions: { outFile: "out.js" }, files: ["f1.ts", "f2.ts"] }) - }; - - host.reloadFS([file1, file2, modifiedConfigFile]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramRootFiles(watch(), [file1.path, file2.path]); - checkProgramActualFiles(watch(), [file1.path, file2.path]); - }); - - it("config file is deleted", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1;" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 2;" - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - const host = createWatchedSystem([file1, file2, libFile, config]); - const watch = createWatchOfConfigFile(config.path, host); - - checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]); - checkOutputErrorsInitial(host, emptyArray); - - host.reloadFS([file1, file2, libFile]); - host.checkTimeoutQueueLengthAndRun(1); - - checkOutputErrorsIncrementalWithExit(host, [ - getDiagnosticWithoutFile(Diagnostics.File_0_not_found, config.path) - ], ExitStatus.DiagnosticsPresent_OutputsSkipped); - }); - - it("Proper errors: document is not contained in project", () => { - const file1 = { - path: "/a/b/app.ts", - content: "" - }; - const corruptedConfig = { - path: "/a/b/tsconfig.json", - content: "{" - }; - const host = createWatchedSystem([file1, corruptedConfig]); - const watch = createWatchOfConfigFile(corruptedConfig.path, host); - - checkProgramActualFiles(watch(), [file1.path]); - }); - - it("correctly handles changes in lib section of config file", () => { - const libES5 = { - path: "/compiler/lib.es5.d.ts", - content: "declare const eval: any" - }; - const libES2015Promise = { - path: "/compiler/lib.es2015.promise.d.ts", - content: "declare class Promise {}" - }; - const app = { - path: "/src/app.ts", - content: "var x: Promise;" - }; - const config1 = { - path: "/src/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: { - module: "commonjs", - target: "es5", - noImplicitAny: true, - sourceMap: false, - lib: [ - "es5" - ] - } - }) - }; - const config2 = { - path: config1.path, - content: JSON.stringify( - { - compilerOptions: { - module: "commonjs", - target: "es5", - noImplicitAny: true, - sourceMap: false, - lib: [ - "es5", - "es2015.promise" - ] - } - }) - }; - const host = createWatchedSystem([libES5, libES2015Promise, app, config1], { executingFilePath: "/compiler/tsc.js" }); - const watch = createWatchOfConfigFile(config1.path, host); - - checkProgramActualFiles(watch(), [libES5.path, app.path]); - - host.reloadFS([libES5, libES2015Promise, app, config2]); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramActualFiles(watch(), [libES5.path, libES2015Promise.path, app.path]); - }); - - it("should handle non-existing directories in config file", () => { - const f = { - path: "/a/src/app.ts", - content: "let x = 1;" - }; - const config = { - path: "/a/tsconfig.json", - content: JSON.stringify({ - compilerOptions: {}, - include: [ - "src/**/*", - "notexistingfolder/*" - ] - }) - }; - const host = createWatchedSystem([f, config]); - const watch = createWatchOfConfigFile(config.path, host); - checkProgramActualFiles(watch(), [f.path]); - }); - - it("rename a module file and rename back should restore the states for inferred projects", () => { - const moduleFile = { - path: "/a/b/moduleFile.ts", - content: "export function bar() { };" - }; - const file1 = { - path: "/a/b/file1.ts", - content: 'import * as T from "./moduleFile"; T.bar();' - }; - const host = createWatchedSystem([moduleFile, file1, libFile]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - checkOutputErrorsInitial(host, emptyArray); - - const moduleFileOldPath = moduleFile.path; - const moduleFileNewPath = "/a/b/moduleFile1.ts"; - moduleFile.path = moduleFileNewPath; - host.reloadFS([moduleFile, file1, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") - ]); - - moduleFile.path = moduleFileOldPath; - host.reloadFS([moduleFile, file1, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("rename a module file and rename back should restore the states for configured projects", () => { - const moduleFile = { - path: "/a/b/moduleFile.ts", - content: "export function bar() { };" - }; - const file1 = { - path: "/a/b/file1.ts", - content: 'import * as T from "./moduleFile"; T.bar();' - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: `{}` - }; - const host = createWatchedSystem([moduleFile, file1, configFile, libFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkOutputErrorsInitial(host, emptyArray); - - const moduleFileOldPath = moduleFile.path; - const moduleFileNewPath = "/a/b/moduleFile1.ts"; - moduleFile.path = moduleFileNewPath; - host.reloadFS([moduleFile, file1, configFile, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") - ]); - - moduleFile.path = moduleFileOldPath; - host.reloadFS([moduleFile, file1, configFile, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("types should load from config file path if config exists", () => { - const f1 = { - path: "/a/b/app.ts", - content: "let x = 1" - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { types: ["node"], typeRoots: [] } }) - }; - const node = { - path: "/a/b/node_modules/@types/node/index.d.ts", - content: "declare var process: any" - }; - const cwd = { - path: "/a/c" - }; - const host = createWatchedSystem([f1, config, node, cwd], { currentDirectory: cwd.path }); - const watch = createWatchOfConfigFile(config.path, host); - - checkProgramActualFiles(watch(), [f1.path, node.path]); - }); - - it("add the missing module file for inferred project: should remove the `module not found` error", () => { - const moduleFile = { - path: "/a/b/moduleFile.ts", - content: "export function bar() { };" - }; - const file1 = { - path: "/a/b/file1.ts", - content: 'import * as T from "./moduleFile"; T.bar();' - }; - const host = createWatchedSystem([file1, libFile]); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - - checkOutputErrorsInitial(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") - ]); - - host.reloadFS([file1, moduleFile, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("Configure file diagnostics events are generated when the config file has errors", () => { - const file = { - path: "/a/b/app.ts", - content: "let x = 10" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "foo": "bar", - "allowJS": true - } - }` - }; - - const host = createWatchedSystem([file, configFile, libFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkOutputErrorsInitial(host, [ - getUnknownCompilerOption(watch(), configFile, "foo"), - getUnknownCompilerOption(watch(), configFile, "allowJS") - ]); - }); - - it("If config file doesnt have errors, they are not reported", () => { - const file = { - path: "/a/b/app.ts", - content: "let x = 10" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {} - }` - }; - - const host = createWatchedSystem([file, configFile, libFile]); - createWatchOfConfigFile(configFile.path, host); - checkOutputErrorsInitial(host, emptyArray); - }); - - it("Reports errors when the config file changes", () => { - const file = { - path: "/a/b/app.ts", - content: "let x = 10" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {} - }` - }; - - const host = createWatchedSystem([file, configFile, libFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - checkOutputErrorsInitial(host, emptyArray); - - configFile.content = `{ - "compilerOptions": { - "haha": 123 - } - }`; - host.reloadFS([file, configFile, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, [ - getUnknownCompilerOption(watch(), configFile, "haha") - ]); - - configFile.content = `{ - "compilerOptions": {} - }`; - host.reloadFS([file, configFile, libFile]); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("non-existing directories listed in config file input array should be tolerated without crashing the server", () => { - const configFile = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "include": ["app/*", "test/**/*", "something"] - }` - }; - const file1 = { - path: "/a/b/file1.ts", - content: "let t = 10;" - }; - - const host = createWatchedSystem([file1, configFile, libFile]); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramActualFiles(watch(), emptyArray); - checkOutputErrorsInitial(host, [ - "error TS18003: No inputs were found in config file '/a/b/tsconfig.json'. Specified 'include' paths were '[\"app/*\",\"test/**/*\",\"something\"]' and 'exclude' paths were '[]'.\n" - ]); - }); - - it("non-existing directories listed in config file input array should be able to handle @types if input file list is empty", () => { - const f = { - path: "/a/app.ts", - content: "let x = 1" - }; - const config = { - path: "/a/tsconfig.json", - content: JSON.stringify({ - compiler: {}, - files: [] - }) - }; - const t1 = { - path: "/a/node_modules/@types/typings/index.d.ts", - content: `export * from "./lib"` - }; - const t2 = { - path: "/a/node_modules/@types/typings/lib.d.ts", - content: `export const x: number` - }; - const host = createWatchedSystem([f, config, t1, t2], { currentDirectory: getDirectoryPath(f.path) }); - const watch = createWatchOfConfigFile(config.path, host); - - checkProgramActualFiles(watch(), emptyArray); - checkOutputErrorsInitial(host, [ - "tsconfig.json(1,24): error TS18002: The 'files' list in config file '/a/tsconfig.json' is empty.\n" - ]); - }); - - it("should support files without extensions", () => { - const f = { - path: "/a/compile", - content: "let x = 1" - }; - const host = createWatchedSystem([f, libFile]); - const watch = createWatchOfFilesAndCompilerOptions([f.path], host, { allowNonTsExtensions: true }); - checkProgramActualFiles(watch(), [f.path, libFile.path]); - }); - - it("Options Diagnostic locations reported correctly with changes in configFile contents when options change", () => { - const file = { - path: "/a/b/app.ts", - content: "let x = 10" - }; - const configFileContentBeforeComment = `{`; - const configFileContentComment = ` - // comment - // More comment`; - const configFileContentAfterComment = ` - "compilerOptions": { - "allowJs": true, - "declaration": true - } - }`; - const configFileContentWithComment = configFileContentBeforeComment + configFileContentComment + configFileContentAfterComment; - const configFileContentWithoutCommentLine = configFileContentBeforeComment + configFileContentAfterComment; - const configFile = { - path: "/a/b/tsconfig.json", - content: configFileContentWithComment - }; - - const files = [file, libFile, configFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - const errors = () => [ - getDiagnosticOfFile(watch().getCompilerOptions().configFile!, configFile.content.indexOf('"allowJs"'), '"allowJs"'.length, Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"), - getDiagnosticOfFile(watch().getCompilerOptions().configFile!, configFile.content.indexOf('"declaration"'), '"declaration"'.length, Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration") - ]; - const intialErrors = errors(); - checkOutputErrorsInitial(host, intialErrors); - - configFile.content = configFileContentWithoutCommentLine; - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - const nowErrors = errors(); - checkOutputErrorsIncremental(host, nowErrors); - assert.equal(nowErrors[0].start, intialErrors[0].start! - configFileContentComment.length); - assert.equal(nowErrors[1].start, intialErrors[1].start! - configFileContentComment.length); - }); - - describe("should not trigger should not trigger recompilation because of program emit", () => { - function verifyWithOptions(options: CompilerOptions, outputFiles: ReadonlyArray) { - const proj = "/user/username/projects/myproject"; - const file1: File = { - path: `${proj}/file1.ts`, - content: "export const c = 30;" - }; - const file2: File = { - path: `${proj}/src/file2.ts`, - content: `import {c} from "file1"; export const d = 30;` - }; - const tsconfig: File = { - path: `${proj}/tsconfig.json`, - content: generateTSConfig(options, emptyArray, "\n") - }; - const host = createWatchedSystem([file1, file2, libFile, tsconfig], { currentDirectory: proj }); - const watch = createWatchOfConfigFile(tsconfig.path, host, /*maxNumberOfFilesToIterateForInvalidation*/1); - checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]); - - outputFiles.forEach(f => host.fileExists(f)); - - // This should be 0 - host.checkTimeoutQueueLengthAndRun(0); - } - - it("without outDir or outFile is specified", () => { - verifyWithOptions({ module: ModuleKind.AMD }, ["file1.js", "src/file2.js"]); - }); - - it("with outFile", () => { - verifyWithOptions({ module: ModuleKind.AMD, outFile: "build/outFile.js" }, ["build/outFile.js"]); - }); - - it("when outDir is specified", () => { - verifyWithOptions({ module: ModuleKind.AMD, outDir: "build" }, ["build/file1.js", "build/src/file2.js"]); - }); - - it("when outDir and declarationDir is specified", () => { - verifyWithOptions({ module: ModuleKind.AMD, outDir: "build", declaration: true, declarationDir: "decls" }, - ["build/file1.js", "build/src/file2.js", "decls/file1.d.ts", "decls/src/file2.d.ts"]); - }); - - it("declarationDir is specified", () => { - verifyWithOptions({ module: ModuleKind.AMD, declaration: true, declarationDir: "decls" }, - ["file1.js", "src/file2.js", "decls/file1.d.ts", "decls/src/file2.d.ts"]); - }); - }); - - it("shouldnt report error about unused function incorrectly when file changes from global to module", () => { - const getFileContent = (asModule: boolean) => ` - function one() {} - ${asModule ? "export " : ""}function two() { - return function three() { - one(); - } - }`; - const file: File = { - path: "/a/b/file.ts", - content: getFileContent(/*asModule*/ false) - }; - const files = [file, libFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfFilesAndCompilerOptions([file.path], host, { - noUnusedLocals: true - }); - checkProgramActualFiles(watch(), files.map(file => file.path)); - checkOutputErrorsInitial(host, []); - - file.content = getFileContent(/*asModule*/ true); - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), files.map(file => file.path)); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("watched files when file is deleted and new file is added as part of change", () => { - const projectLocation = "/home/username/project"; - const file: File = { - path: `${projectLocation}/src/file1.ts`, - content: "var a = 10;" - }; - const configFile: File = { - path: `${projectLocation}/tsconfig.json`, - content: "{}" - }; - const files = [file, libFile, configFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - verifyProgram(); - - file.path = file.path.replace("file1", "file2"); - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - verifyProgram(); - - function verifyProgram() { - checkProgramActualFiles(watch(), mapDefined(files, f => f === configFile ? undefined : f.path)); - checkWatchedDirectories(host, [], /*recursive*/ false); - checkWatchedDirectories(host, [projectLocation, `${projectLocation}/node_modules/@types`], /*recursive*/ true); - checkWatchedFiles(host, files.map(f => f.path)); - } - }); - - it("updates errors correctly when declaration emit is disabled in compiler options", () => { - const currentDirectory = "/user/username/projects/myproject"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `import test from './b'; -test(4, 5);` - }; - const bFileContent = `function test(x: number, y: number) { - return x + y / 5; -} -export default test;`; - const bFile: File = { - path: `${currentDirectory}/b.ts`, - content: bFileContent - }; - const tsconfigFile: File = { - path: `${currentDirectory}/tsconfig.json`, - content: JSON.stringify({ - compilerOptions: { - module: "commonjs", - noEmit: true, - strict: true, - } - }) - }; - const files = [aFile, bFile, libFile, tsconfigFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - checkOutputErrorsInitial(host, emptyArray); - - changeParameterType("x", "string", [ - getDiagnosticOfFileFromProgram(watch(), aFile.path, aFile.content.indexOf("4"), 1, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, "4", "string") - ]); - changeParameterType("y", "string", [ - getDiagnosticOfFileFromProgram(watch(), aFile.path, aFile.content.indexOf("5"), 1, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, "5", "string"), - getDiagnosticOfFileFromProgram(watch(), bFile.path, bFile.content.indexOf("y /"), 1, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type) - ]); - - function changeParameterType(parameterName: string, toType: string, expectedErrors: ReadonlyArray) { - const newContent = bFileContent.replace(new RegExp(`${parameterName}\: [a-z]*`), `${parameterName}: ${toType}`); - - verifyErrorsWithBFileContents(newContent, expectedErrors); - verifyErrorsWithBFileContents(bFileContent, emptyArray); - } - - function verifyErrorsWithBFileContents(content: string, expectedErrors: ReadonlyArray) { - host.writeFile(bFile.path, content); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, expectedErrors); - } - }); - - it("updates errors when deep import file changes", () => { - const currentDirectory = "/user/username/projects/myproject"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `import {B} from './b'; -declare var console: any; -let b = new B(); -console.log(b.c.d);` - }; - const bFile: File = { - path: `${currentDirectory}/b.ts`, - content: `import {C} from './c'; -export class B -{ - c = new C(); -}` - }; - const cFile: File = { - path: `${currentDirectory}/c.ts`, - content: `export class C -{ - d = 1; -}` - }; - const config: File = { - path: `${currentDirectory}/tsconfig.json`, - content: `{}` - }; - const files = [aFile, bFile, cFile, config, libFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - checkProgramActualFiles(watch(), [aFile.path, bFile.path, cFile.path, libFile.path]); - checkOutputErrorsInitial(host, emptyArray); - const modifiedTimeOfAJs = host.getModifiedTime(`${currentDirectory}/a.js`); - host.writeFile(cFile.path, cFile.content.replace("d", "d2")); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, [ - getDiagnosticOfFileFromProgram(watch(), aFile.path, aFile.content.lastIndexOf("d"), 1, Diagnostics.Property_0_does_not_exist_on_type_1, "d", "C") - ]); - // File a need not be rewritten - assert.equal(host.getModifiedTime(`${currentDirectory}/a.js`), modifiedTimeOfAJs); - }); - - it("updates errors when deep import through declaration file changes", () => { - const currentDirectory = "/user/username/projects/myproject"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `import {B} from './b'; -declare var console: any; -let b = new B(); -console.log(b.c.d);` - }; - const bFile: File = { - path: `${currentDirectory}/b.d.ts`, - content: `import {C} from './c'; -export class B -{ - c: C; -}` - }; - const cFile: File = { - path: `${currentDirectory}/c.d.ts`, - content: `export class C -{ - d: number; -}` - }; - const config: File = { - path: `${currentDirectory}/tsconfig.json`, - content: `{}` - }; - const files = [aFile, bFile, cFile, config, libFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - checkProgramActualFiles(watch(), [aFile.path, bFile.path, cFile.path, libFile.path]); - checkOutputErrorsInitial(host, emptyArray); - const modifiedTimeOfAJs = host.getModifiedTime(`${currentDirectory}/a.js`); - host.writeFile(cFile.path, cFile.content.replace("d", "d2")); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, [ - getDiagnosticOfFileFromProgram(watch(), aFile.path, aFile.content.lastIndexOf("d"), 1, Diagnostics.Property_0_does_not_exist_on_type_1, "d", "C") - ]); - // File a need not be rewritten - assert.equal(host.getModifiedTime(`${currentDirectory}/a.js`), modifiedTimeOfAJs); - }); - - it("updates errors when strictNullChecks changes", () => { - const currentDirectory = "/user/username/projects/myproject"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `declare function foo(): null | { hello: any }; -foo().hello` - }; - const config: File = { - path: `${currentDirectory}/tsconfig.json`, - content: JSON.stringify({ compilerOptions: {} }) - }; - const files = [aFile, config, libFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsInitial(host, emptyArray); - const modifiedTimeOfAJs = host.getModifiedTime(`${currentDirectory}/a.js`); - host.writeFile(config.path, JSON.stringify({ compilerOptions: { strictNullChecks: true } })); - host.runQueuedTimeoutCallbacks(); - const expectedStrictNullErrors = [ - getDiagnosticOfFileFromProgram(watch(), aFile.path, aFile.content.lastIndexOf("foo()"), 5, Diagnostics.Object_is_possibly_null) - ]; - checkOutputErrorsIncremental(host, expectedStrictNullErrors); - // File a need not be rewritten - assert.equal(host.getModifiedTime(`${currentDirectory}/a.js`), modifiedTimeOfAJs); - host.writeFile(config.path, JSON.stringify({ compilerOptions: { strict: true, alwaysStrict: false } })); // Avoid changing 'alwaysStrict' or must re-bind - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, expectedStrictNullErrors); - // File a need not be rewritten - assert.equal(host.getModifiedTime(`${currentDirectory}/a.js`), modifiedTimeOfAJs); - host.writeFile(config.path, JSON.stringify({ compilerOptions: {} })); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - // File a need not be rewritten - assert.equal(host.getModifiedTime(`${currentDirectory}/a.js`), modifiedTimeOfAJs); - }); - - it("updates errors when ambient modules of program changes", () => { - const currentDirectory = "/user/username/projects/myproject"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `declare module 'a' { - type foo = number; -}` - }; - const config: File = { - path: `${currentDirectory}/tsconfig.json`, - content: "{}" - }; - const files = [aFile, config, libFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsInitial(host, emptyArray); - - // Create bts with same file contents - const bTsPath = `${currentDirectory}/b.ts`; - host.writeFile(bTsPath, aFile.content); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), [aFile.path, "b.ts", libFile.path]); - checkOutputErrorsIncremental(host, [ - "a.ts(2,8): error TS2300: Duplicate identifier 'foo'.\n", - "b.ts(2,8): error TS2300: Duplicate identifier 'foo'.\n" - ]); - - // Delete bTs - host.deleteFile(bTsPath); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsIncremental(host, emptyArray); - }); - - describe("updates errors when file transitively exported file changes", () => { - const projectLocation = "/user/username/projects/myproject"; - const config: File = { - path: `${projectLocation}/tsconfig.json`, - content: JSON.stringify({ - files: ["app.ts"], - compilerOptions: { baseUrl: "." } - }) - }; - const app: File = { - path: `${projectLocation}/app.ts`, - content: `import { Data } from "lib2/public"; -export class App { - public constructor() { - new Data().test(); - } -}` - }; - const lib2Public: File = { - path: `${projectLocation}/lib2/public.ts`, - content: `export * from "./data";` - }; - const lib2Data: File = { - path: `${projectLocation}/lib2/data.ts`, - content: `import { ITest } from "lib1/public"; -export class Data { - public test() { - const result: ITest = { - title: "title" - } - return result; - } -}` - }; - const lib1Public: File = { - path: `${projectLocation}/lib1/public.ts`, - content: `export * from "./tools/public";` - }; - const lib1ToolsPublic: File = { - path: `${projectLocation}/lib1/tools/public.ts`, - content: `export * from "./tools.interface";` - }; - const lib1ToolsInterface: File = { - path: `${projectLocation}/lib1/tools/tools.interface.ts`, - content: `export interface ITest { - title: string; -}` - }; - - function verifyTransitiveExports(filesWithoutConfig: ReadonlyArray) { - const files = [config, ...filesWithoutConfig]; - const host = createWatchedSystem(files, { currentDirectory: projectLocation }); - const watch = createWatchOfConfigFile(config.path, host); - checkProgramActualFiles(watch(), filesWithoutConfig.map(f => f.path)); - checkOutputErrorsInitial(host, emptyArray); - - host.writeFile(lib1ToolsInterface.path, lib1ToolsInterface.content.replace("title", "title2")); - host.checkTimeoutQueueLengthAndRun(1); - checkProgramActualFiles(watch(), filesWithoutConfig.map(f => f.path)); - checkOutputErrorsIncremental(host, [ - "lib2/data.ts(5,13): error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'.\n Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?\n" - ]); - - } - it("when there are no circular import and exports", () => { - verifyTransitiveExports([libFile, app, lib2Public, lib2Data, lib1Public, lib1ToolsPublic, lib1ToolsInterface]); - }); - - it("when there are circular import and exports", () => { - const lib2Data: File = { - path: `${projectLocation}/lib2/data.ts`, - content: `import { ITest } from "lib1/public"; import { Data2 } from "./data2"; -export class Data { - public dat?: Data2; public test() { - const result: ITest = { - title: "title" - } - return result; - } -}` - }; - const lib2Data2: File = { - path: `${projectLocation}/lib2/data2.ts`, - content: `import { Data } from "./data"; -export class Data2 { - public dat?: Data; -}` - }; - verifyTransitiveExports([libFile, app, lib2Public, lib2Data, lib2Data2, lib1Public, lib1ToolsPublic, lib1ToolsInterface]); - }); - }); - - describe("updates errors in lib file", () => { - const currentDirectory = "/user/username/projects/myproject"; - const field = "fullscreen"; - const fieldWithoutReadonly = `interface Document { - ${field}: boolean; -}`; - - const libFileWithDocument: File = { - path: libFile.path, - content: `${libFile.content} -interface Document { - readonly ${field}: boolean; -}` - }; - - function getDiagnostic(program: Program, file: File) { - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(field), field.length, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, field); - } - - function verifyLibFileErrorsWith(aFile: File) { - const files = [aFile, libFileWithDocument]; - - function verifyLibErrors(options: CompilerOptions) { - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfFilesAndCompilerOptions([aFile.path], host, options); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsInitial(host, getErrors()); - - host.writeFile(aFile.path, aFile.content.replace(fieldWithoutReadonly, "var x: string;")); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsIncremental(host, emptyArray); - - host.writeFile(aFile.path, aFile.content); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), [aFile.path, libFile.path]); - checkOutputErrorsIncremental(host, getErrors()); - - function getErrors() { - return [ - ...(options.skipLibCheck || options.skipDefaultLibCheck ? [] : [getDiagnostic(watch(), libFileWithDocument)]), - getDiagnostic(watch(), aFile) - ]; - } - } - - it("with default options", () => { - verifyLibErrors({}); - }); - it("with skipLibCheck", () => { - verifyLibErrors({ skipLibCheck: true }); - }); - it("with skipDefaultLibCheck", () => { - verifyLibErrors({ skipDefaultLibCheck: true }); - }); - } - - describe("when non module file changes", () => { - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `${fieldWithoutReadonly} -var y: number;` - }; - verifyLibFileErrorsWith(aFile); - }); - - describe("when module file with global definitions changes", () => { - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `export {} -declare global { -${fieldWithoutReadonly} -var y: number; -}` - }; - verifyLibFileErrorsWith(aFile); - }); - }); - - it("when skipLibCheck and skipDefaultLibCheck changes", () => { - const currentDirectory = "/user/username/projects/myproject"; - const field = "fullscreen"; - const aFile: File = { - path: `${currentDirectory}/a.ts`, - content: `interface Document { - ${field}: boolean; -}` - }; - const bFile: File = { - path: `${currentDirectory}/b.d.ts`, - content: `interface Document { - ${field}: boolean; -}` - }; - const libFileWithDocument: File = { - path: libFile.path, - content: `${libFile.content} -interface Document { - readonly ${field}: boolean; -}` - }; - const configFile: File = { - path: `${currentDirectory}/tsconfig.json`, - content: "{}" - }; - - const files = [aFile, bFile, configFile, libFileWithDocument]; - - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfConfigFile("tsconfig.json", host); - verifyProgramFiles(); - checkOutputErrorsInitial(host, [ - getDiagnostic(libFileWithDocument), - getDiagnostic(aFile), - getDiagnostic(bFile) - ]); - - verifyConfigChange({ skipLibCheck: true }, [aFile]); - verifyConfigChange({ skipDefaultLibCheck: true }, [aFile, bFile]); - verifyConfigChange({}, [libFileWithDocument, aFile, bFile]); - verifyConfigChange({ skipDefaultLibCheck: true }, [aFile, bFile]); - verifyConfigChange({ skipLibCheck: true }, [aFile]); - verifyConfigChange({}, [libFileWithDocument, aFile, bFile]); - - function verifyConfigChange(compilerOptions: CompilerOptions, errorInFiles: ReadonlyArray) { - host.writeFile(configFile.path, JSON.stringify({ compilerOptions })); - host.runQueuedTimeoutCallbacks(); - verifyProgramFiles(); - checkOutputErrorsIncremental(host, errorInFiles.map(getDiagnostic)); - } - - function getDiagnostic(file: File) { - return getDiagnosticOfFileFromProgram(watch(), file.path, file.content.indexOf(field), field.length, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, field); - } - - function verifyProgramFiles() { - checkProgramActualFiles(watch(), [aFile.path, bFile.path, libFile.path]); - } - }); - }); - - describe("tsc-watch emit with outFile or out setting", () => { - function createWatchForOut(out?: string, outFile?: string) { - const host = createWatchedSystem([]); - const config: FileOrFolderEmit = { - path: "/a/tsconfig.json", - content: JSON.stringify({ - compilerOptions: { listEmittedFiles: true } - }) - }; - - let getOutput: (file: File) => string; - if (out) { - config.content = JSON.stringify({ - compilerOptions: { listEmittedFiles: true, out } - }); - getOutput = __ => getEmittedLineForSingleFileOutput(out, host); - } - else if (outFile) { - config.content = JSON.stringify({ - compilerOptions: { listEmittedFiles: true, outFile } - }); - getOutput = __ => getEmittedLineForSingleFileOutput(outFile, host); - } - else { - getOutput = file => getEmittedLineForMultiFileOutput(file, host); - } - - const f1 = getFileOrFolderEmit({ - path: "/a/a.ts", - content: "let x = 1" - }, getOutput); - const f2 = getFileOrFolderEmit({ - path: "/a/b.ts", - content: "let y = 1" - }, getOutput); - - const files = [f1, f2, config, libFile]; - host.reloadFS(files); - createWatchOfConfigFile(config.path, host); - - const allEmittedLines = getEmittedLines(files); - checkOutputContains(host, allEmittedLines); - host.clearOutput(); - - f1.content = "let x = 11"; - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - checkAffectedLines(host, [f1], allEmittedLines); - } - - it("projectUsesOutFile should not be returned if not set", () => { - createWatchForOut(); - }); - - it("projectUsesOutFile should be true if out is set", () => { - const outJs = "/a/out.js"; - createWatchForOut(outJs); - }); - - it("projectUsesOutFile should be true if outFile is set", () => { - const outJs = "/a/out.js"; - createWatchForOut(/*out*/ undefined, outJs); - }); - - function verifyFilesEmittedOnce(useOutFile: boolean) { - const file1: File = { - path: "/a/b/output/AnotherDependency/file1.d.ts", - content: "declare namespace Common.SomeComponent.DynamicMenu { enum Z { Full = 0, Min = 1, Average = 2, } }" - }; - const file2: File = { - path: "/a/b/dependencies/file2.d.ts", - content: "declare namespace Dependencies.SomeComponent { export class SomeClass { version: string; } }" - }; - const file3: File = { - path: "/a/b/project/src/main.ts", - content: "namespace Main { export function fooBar() {} }" - }; - const file4: File = { - path: "/a/b/project/src/main2.ts", - content: "namespace main.file4 { import DynamicMenu = Common.SomeComponent.DynamicMenu; export function foo(a: DynamicMenu.z) { } }" - }; - const configFile: File = { - path: "/a/b/project/tsconfig.json", - content: JSON.stringify({ - compilerOptions: useOutFile ? - { outFile: "../output/common.js", target: "es5" } : - { outDir: "../output", target: "es5" }, - files: [file1.path, file2.path, file3.path, file4.path] - }) - }; - const files = [file1, file2, file3, file4]; - const allfiles = files.concat(configFile); - const host = createWatchedSystem(allfiles); - const originalWriteFile = host.writeFile.bind(host); - const mapOfFilesWritten = createMap(); - host.writeFile = (p: string, content: string) => { - const count = mapOfFilesWritten.get(p); - mapOfFilesWritten.set(p, count ? count + 1 : 1); - return originalWriteFile(p, content); - }; - createWatchOfConfigFile(configFile.path, host); - if (useOutFile) { - // Only out file - assert.equal(mapOfFilesWritten.size, 1); - } - else { - // main.js and main2.js - assert.equal(mapOfFilesWritten.size, 2); - } - mapOfFilesWritten.forEach((value, key) => { - assert.equal(value, 1, "Key: " + key); - }); - } - - it("with --outFile and multiple declaration files in the program", () => { - verifyFilesEmittedOnce(/*useOutFile*/ true); - }); - - it("without --outFile and multiple declaration files in the program", () => { - verifyFilesEmittedOnce(/*useOutFile*/ false); - }); - }); - - describe("tsc-watch emit for configured projects", () => { - const file1Consumer1Path = "/a/b/file1Consumer1.ts"; - const moduleFile1Path = "/a/b/moduleFile1.ts"; - const configFilePath = "/a/b/tsconfig.json"; - interface InitialStateParams { - /** custom config file options */ - configObj?: any; - /** list of the files that will be emitted for first compilation */ - firstCompilationEmitFiles?: string[]; - /** get the emit file for file - default is multi file emit line */ - getEmitLine?(file: File, host: WatchedSystem): string; - /** Additional files and folders to add */ - getAdditionalFileOrFolder?(): File[]; - /** initial list of files to emit if not the default list */ - firstReloadFileList?: string[]; - } - function getInitialState({ configObj = {}, firstCompilationEmitFiles, getEmitLine, getAdditionalFileOrFolder, firstReloadFileList }: InitialStateParams = {}) { - const host = createWatchedSystem([]); - const getOutputName = getEmitLine ? (file: File) => getEmitLine(file, host) : - (file: File) => getEmittedLineForMultiFileOutput(file, host); - - const moduleFile1 = getFileOrFolderEmit({ - path: moduleFile1Path, - content: "export function Foo() { };", - }, getOutputName); - - const file1Consumer1 = getFileOrFolderEmit({ - path: file1Consumer1Path, - content: `import {Foo} from "./moduleFile1"; export var y = 10;`, - }, getOutputName); - - const file1Consumer2 = getFileOrFolderEmit({ - path: "/a/b/file1Consumer2.ts", - content: `import {Foo} from "./moduleFile1"; let z = 10;`, - }, getOutputName); - - const moduleFile2 = getFileOrFolderEmit({ - path: "/a/b/moduleFile2.ts", - content: `export var Foo4 = 10;`, - }, getOutputName); - - const globalFile3 = getFileOrFolderEmit({ - path: "/a/b/globalFile3.ts", - content: `interface GlobalFoo { age: number }` - }); - - const additionalFiles = getAdditionalFileOrFolder ? - map(getAdditionalFileOrFolder(), file => getFileOrFolderEmit(file, getOutputName)) : - []; - - (configObj.compilerOptions || (configObj.compilerOptions = {})).listEmittedFiles = true; - const configFile = getFileOrFolderEmit({ - path: configFilePath, - content: JSON.stringify(configObj) - }); - - const files = [moduleFile1, file1Consumer1, file1Consumer2, globalFile3, moduleFile2, configFile, libFile, ...additionalFiles]; - let allEmittedFiles = getEmittedLines(files); - host.reloadFS(firstReloadFileList ? getFiles(firstReloadFileList) : files); - - // Initial compile - createWatchOfConfigFile(configFile.path, host); - if (firstCompilationEmitFiles) { - checkAffectedLines(host, getFiles(firstCompilationEmitFiles), allEmittedFiles); - } - else { - checkOutputContains(host, allEmittedFiles); - } - host.clearOutput(); - - return { - moduleFile1, file1Consumer1, file1Consumer2, moduleFile2, globalFile3, configFile, - files, - getFile, - verifyAffectedFiles, - verifyAffectedAllFiles, - getOutputName - }; - - function getFiles(filelist: string[]) { - return map(filelist, getFile); - } - - function getFile(fileName: string) { - return find(files, file => file.path === fileName)!; - } - - function verifyAffectedAllFiles() { - host.reloadFS(files); - host.checkTimeoutQueueLengthAndRun(1); - checkOutputContains(host, allEmittedFiles); - host.clearOutput(); - } - - function verifyAffectedFiles(expected: FileOrFolderEmit[], filesToReload?: FileOrFolderEmit[]) { - if (!filesToReload) { - filesToReload = files; - } - else if (filesToReload.length > files.length) { - allEmittedFiles = getEmittedLines(filesToReload); - } - host.reloadFS(filesToReload); - host.checkTimeoutQueueLengthAndRun(1); - checkAffectedLines(host, expected, allEmittedFiles); - host.clearOutput(); - } - } - - it("should contains only itself if a module file's shape didn't change, and all files referencing it if its shape changed", () => { - const { - moduleFile1, file1Consumer1, file1Consumer2, - verifyAffectedFiles - } = getInitialState(); - - // Change the content of moduleFile1 to `export var T: number;export function Foo() { };` - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1, file1Consumer2]); - - // Change the content of moduleFile1 to `export var T: number;export function Foo() { console.log('hi'); };` - moduleFile1.content = `export var T: number;export function Foo() { console.log('hi'); };`; - verifyAffectedFiles([moduleFile1]); - }); - - it("should be up-to-date with the reference map changes", () => { - const { - moduleFile1, file1Consumer1, file1Consumer2, - verifyAffectedFiles - } = getInitialState(); - - // Change file1Consumer1 content to `export let y = Foo();` - file1Consumer1.content = `export let y = Foo();`; - verifyAffectedFiles([file1Consumer1]); - - // Change the content of moduleFile1 to `export var T: number;export function Foo() { };` - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer2]); - - // Add the import statements back to file1Consumer1 - file1Consumer1.content = `import {Foo} from "./moduleFile1";let y = Foo();`; - verifyAffectedFiles([file1Consumer1]); - - // Change the content of moduleFile1 to `export var T: number;export var T2: string;export function Foo() { };` - moduleFile1.content = `export var T: number;export var T2: string;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer2, file1Consumer1]); - - // Multiple file edits in one go: - - // Change file1Consumer1 content to `export let y = Foo();` - // Change the content of moduleFile1 to `export var T: number;export function Foo() { };` - file1Consumer1.content = `export let y = Foo();`; - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1, file1Consumer2]); - }); - - it("should be up-to-date with deleted files", () => { - const { - moduleFile1, file1Consumer1, file1Consumer2, - files, - verifyAffectedFiles - } = getInitialState(); - - // Change the content of moduleFile1 to `export var T: number;export function Foo() { };` - moduleFile1.content = `export var T: number;export function Foo() { };`; - - // Delete file1Consumer2 - const filesToLoad = mapDefined(files, file => file === file1Consumer2 ? undefined : file); - verifyAffectedFiles([moduleFile1, file1Consumer1], filesToLoad); - }); - - it("should be up-to-date with newly created files", () => { - const { - moduleFile1, file1Consumer1, file1Consumer2, - files, - verifyAffectedFiles, - getOutputName - } = getInitialState(); - - const file1Consumer3 = getFileOrFolderEmit({ - path: "/a/b/file1Consumer3.ts", - content: `import {Foo} from "./moduleFile1"; let y = Foo();` - }, getOutputName); - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1, file1Consumer3, file1Consumer2], files.concat(file1Consumer3)); - }); - - it("should detect changes in non-root files", () => { - const { - moduleFile1, file1Consumer1, - verifyAffectedFiles - } = getInitialState({ configObj: { files: [file1Consumer1Path] }, firstCompilationEmitFiles: [file1Consumer1Path, moduleFile1Path] }); - - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1]); - - // change file1 internal, and verify only file1 is affected - moduleFile1.content += "var T1: number;"; - verifyAffectedFiles([moduleFile1]); - }); - - it("should return all files if a global file changed shape", () => { - const { - globalFile3, verifyAffectedAllFiles - } = getInitialState(); - - globalFile3.content += "var T2: string;"; - verifyAffectedAllFiles(); - }); - - it("should always return the file itself if '--isolatedModules' is specified", () => { - const { - moduleFile1, verifyAffectedFiles - } = getInitialState({ configObj: { compilerOptions: { isolatedModules: true } } }); - - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1]); - }); - - it("should always return the file itself if '--out' or '--outFile' is specified", () => { - const outFilePath = "/a/b/out.js"; - const { - moduleFile1, verifyAffectedFiles - } = getInitialState({ - configObj: { compilerOptions: { module: "system", outFile: outFilePath } }, - getEmitLine: (_, host) => getEmittedLineForSingleFileOutput(outFilePath, host) - }); - - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1]); - }); - - it("should return cascaded affected file list", () => { - const file1Consumer1Consumer1: File = { - path: "/a/b/file1Consumer1Consumer1.ts", - content: `import {y} from "./file1Consumer1";` - }; - const { - moduleFile1, file1Consumer1, file1Consumer2, verifyAffectedFiles, getFile - } = getInitialState({ - getAdditionalFileOrFolder: () => [file1Consumer1Consumer1] - }); - - const file1Consumer1Consumer1Emit = getFile(file1Consumer1Consumer1.path); - file1Consumer1.content += "export var T: number;"; - verifyAffectedFiles([file1Consumer1, file1Consumer1Consumer1Emit]); - - // Doesnt change the shape of file1Consumer1 - moduleFile1.content = `export var T: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1, file1Consumer2]); - - // Change both files before the timeout - file1Consumer1.content += "export var T2: number;"; - moduleFile1.content = `export var T2: number;export function Foo() { };`; - verifyAffectedFiles([moduleFile1, file1Consumer1, file1Consumer2, file1Consumer1Consumer1Emit]); - }); - - it("should work fine for files with circular references", () => { - // TODO: do not exit on such errors? Just continue to watch the files for update in watch mode - - const file1: File = { - path: "/a/b/file1.ts", - content: ` - /// - export var t1 = 10;` - }; - const file2: File = { - path: "/a/b/file2.ts", - content: ` - /// - export var t2 = 10;` - }; - const { - configFile, - getFile, - verifyAffectedFiles - } = getInitialState({ - firstCompilationEmitFiles: [file1.path, file2.path], - getAdditionalFileOrFolder: () => [file1, file2], - firstReloadFileList: [libFile.path, file1.path, file2.path, configFilePath] - }); - const file1Emit = getFile(file1.path), file2Emit = getFile(file2.path); - - file1Emit.content += "export var t3 = 10;"; - verifyAffectedFiles([file1Emit, file2Emit], [file1, file2, libFile, configFile]); - - }); - - it("should detect removed code file", () => { - const referenceFile1: File = { - path: "/a/b/referenceFile1.ts", - content: ` - /// - export var x = Foo();` - }; - const { - configFile, - getFile, - verifyAffectedFiles - } = getInitialState({ - firstCompilationEmitFiles: [referenceFile1.path, moduleFile1Path], - getAdditionalFileOrFolder: () => [referenceFile1], - firstReloadFileList: [libFile.path, referenceFile1.path, moduleFile1Path, configFilePath] - }); - - const referenceFile1Emit = getFile(referenceFile1.path); - verifyAffectedFiles([referenceFile1Emit], [libFile, referenceFile1Emit, configFile]); - }); - - it("should detect non-existing code file", () => { - const referenceFile1: File = { - path: "/a/b/referenceFile1.ts", - content: ` - /// - export var x = Foo();` - }; - const { - configFile, - moduleFile2, - getFile, - verifyAffectedFiles - } = getInitialState({ - firstCompilationEmitFiles: [referenceFile1.path], - getAdditionalFileOrFolder: () => [referenceFile1], - firstReloadFileList: [libFile.path, referenceFile1.path, configFilePath] - }); - - const referenceFile1Emit = getFile(referenceFile1.path); - referenceFile1Emit.content += "export var yy = Foo();"; - verifyAffectedFiles([referenceFile1Emit], [libFile, referenceFile1Emit, configFile]); - - // Create module File2 and see both files are saved - verifyAffectedFiles([referenceFile1Emit, moduleFile2], [libFile, moduleFile2, referenceFile1Emit, configFile]); - }); - }); - - describe("tsc-watch emit file content", () => { - interface EmittedFile extends File { - shouldBeWritten: boolean; - } - function getEmittedFiles(files: FileOrFolderEmit[], contents: string[]): EmittedFile[] { - return map(contents, (content, index) => { - return { - content, - path: changeExtension(files[index].path, Extension.Js), - shouldBeWritten: true - }; - } - ); - } - function verifyEmittedFiles(host: WatchedSystem, emittedFiles: EmittedFile[]) { - for (const { path, content, shouldBeWritten } of emittedFiles) { - if (shouldBeWritten) { - assert.isTrue(host.fileExists(path), `Expected file ${path} to be present`); - assert.equal(host.readFile(path), content, `Contents of file ${path} do not match`); - } - else { - assert.isNotTrue(host.fileExists(path), `Expected file ${path} to be absent`); - } - } - } - - function verifyEmittedFileContents(newLine: string, inputFiles: File[], initialEmittedFileContents: string[], - modifyFiles: (files: FileOrFolderEmit[], emitedFiles: EmittedFile[]) => FileOrFolderEmit[], configFile?: File) { - const host = createWatchedSystem([], { newLine }); - const files = concatenate( - map(inputFiles, file => getFileOrFolderEmit(file, fileToConvert => getEmittedLineForMultiFileOutput(fileToConvert, host))), - configFile ? [libFile, configFile] : [libFile] - ); - const allEmittedFiles = getEmittedLines(files); - host.reloadFS(files); - - // Initial compile - if (configFile) { - createWatchOfConfigFile(configFile.path, host); - } - else { - // First file as the root - createWatchOfFilesAndCompilerOptions([files[0].path], host, { listEmittedFiles: true }); - } - checkOutputContains(host, allEmittedFiles); - - const emittedFiles = getEmittedFiles(files, initialEmittedFileContents); - verifyEmittedFiles(host, emittedFiles); - host.clearOutput(); - - const affectedFiles = modifyFiles(files, emittedFiles); - host.reloadFS(files); - host.checkTimeoutQueueLengthAndRun(1); - checkAffectedLines(host, affectedFiles, allEmittedFiles); - - verifyEmittedFiles(host, emittedFiles); - } - - function verifyNewLine(newLine: string) { - const lines = ["var x = 1;", "var y = 2;"]; - const fileContent = lines.join(newLine); - const f = { - path: "/a/app.ts", - content: fileContent - }; - - verifyEmittedFileContents(newLine, [f], [fileContent + newLine], modifyFiles); - - function modifyFiles(files: FileOrFolderEmit[], emittedFiles: EmittedFile[]) { - files[0].content = fileContent + newLine + "var z = 3;"; - emittedFiles[0].content = files[0].content + newLine; - return [files[0]]; - } - } - - it("handles new lines: \\n", () => { - verifyNewLine("\n"); - }); - - it("handles new lines: \\r\\n", () => { - verifyNewLine("\r\n"); - }); - - it("should emit specified file", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export function Foo() { return 10; }` - }; - - const file2 = { - path: "/a/b/f2.ts", - content: `import {Foo} from "./f1"; export let y = Foo();` - }; - - const file3 = { - path: "/a/b/f3.ts", - content: `import {y} from "./f2"; let x = y;` - }; - - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { listEmittedFiles: true } }) - }; - - verifyEmittedFileContents("\r\n", [file1, file2, file3], [ - `"use strict";\r\nexports.__esModule = true;\r\nfunction Foo() { return 10; }\r\nexports.Foo = Foo;\r\n`, - `"use strict";\r\nexports.__esModule = true;\r\nvar f1_1 = require("./f1");\r\nexports.y = f1_1.Foo();\r\n`, - `"use strict";\r\nexports.__esModule = true;\r\nvar f2_1 = require("./f2");\r\nvar x = f2_1.y;\r\n` - ], modifyFiles, configFile); - - function modifyFiles(files: FileOrFolderEmit[], emittedFiles: EmittedFile[]) { - files[0].content += `export function foo2() { return 2; }`; - emittedFiles[0].content += `function foo2() { return 2; }\r\nexports.foo2 = foo2;\r\n`; - emittedFiles[2].shouldBeWritten = false; - return files.slice(0, 2); - } - }); - - it("Elides const enums correctly in incremental compilation", () => { - const currentDirectory = "/user/someone/projects/myproject"; - const file1: File = { - path: `${currentDirectory}/file1.ts`, - content: "export const enum E1 { V = 1 }" - }; - const file2: File = { - path: `${currentDirectory}/file2.ts`, - content: `import { E1 } from "./file1"; export const enum E2 { V = E1.V }` - }; - const file3: File = { - path: `${currentDirectory}/file3.ts`, - content: `import { E2 } from "./file2"; const v: E2 = E2.V;` - }; - const strictAndEsModule = `"use strict";\nexports.__esModule = true;\n`; - verifyEmittedFileContents("\n", [file3, file2, file1], [ - `${strictAndEsModule}var v = 1 /* V */;\n`, - strictAndEsModule, - strictAndEsModule - ], modifyFiles); - - function modifyFiles(files: FileOrFolderEmit[], emittedFiles: EmittedFile[]) { - files[0].content += `function foo2() { return 2; }`; - emittedFiles[0].content += `function foo2() { return 2; }\n`; - emittedFiles[1].shouldBeWritten = false; - emittedFiles[2].shouldBeWritten = false; - return [files[0]]; - } - }); - - it("file is deleted and created as part of change", () => { - const projectLocation = "/home/username/project"; - const file: File = { - path: `${projectLocation}/app/file.ts`, - content: "var a = 10;" - }; - const fileJs = `${projectLocation}/app/file.js`; - const configFile: File = { - path: `${projectLocation}/tsconfig.json`, - content: JSON.stringify({ - include: [ - "app/**/*.ts" - ] - }) - }; - const files = [file, configFile, libFile]; - const host = createWatchedSystem(files, { currentDirectory: projectLocation, useCaseSensitiveFileNames: true }); - createWatchOfConfigFile("tsconfig.json", host); - verifyProgram(); - - file.content += "\nvar b = 10;"; - - host.reloadFS(files, { invokeFileDeleteCreateAsPartInsteadOfChange: true }); - host.runQueuedTimeoutCallbacks(); - verifyProgram(); - - function verifyProgram() { - assert.isTrue(host.fileExists(fileJs)); - assert.equal(host.readFile(fileJs), file.content + "\n"); - } - }); - }); - - describe("tsc-watch module resolution caching", () => { - it("works", () => { - const root = { - path: "/a/d/f0.ts", - content: `import {x} from "f1"` - }; - const imported = { - path: "/a/f1.ts", - content: `foo()` - }; - - const files = [root, imported, libFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfFilesAndCompilerOptions([root.path], host, { module: ModuleKind.AMD }); - - const f1IsNotModule = getDiagnosticOfFileFromProgram(watch(), root.path, root.content.indexOf('"f1"'), '"f1"'.length, Diagnostics.File_0_is_not_a_module, imported.path); - const cannotFindFoo = getDiagnosticOfFileFromProgram(watch(), imported.path, imported.content.indexOf("foo"), "foo".length, Diagnostics.Cannot_find_name_0, "foo"); - - // ensure that imported file was found - checkOutputErrorsInitial(host, [f1IsNotModule, cannotFindFoo]); - - const originalFileExists = host.fileExists; - { - const newContent = `import {x} from "f1" - var x: string = 1;`; - root.content = newContent; - host.reloadFS(files); - - // patch fileExists to make sure that disk is not touched - host.fileExists = notImplemented; - - // trigger synchronization to make sure that import will be fetched from the cache - host.runQueuedTimeoutCallbacks(); - - // ensure file has correct number of errors after edit - checkOutputErrorsIncremental(host, [ - f1IsNotModule, - getDiagnosticOfFileFromProgram(watch(), root.path, newContent.indexOf("var x") + "var ".length, "x".length, Diagnostics.Type_0_is_not_assignable_to_type_1, 1, "string"), - cannotFindFoo - ]); - } - { - let fileExistsIsCalled = false; - host.fileExists = (fileName): boolean => { - if (fileName === "lib.d.ts") { - return false; - } - fileExistsIsCalled = true; - assert.isTrue(fileName.indexOf("/f2.") !== -1); - return originalFileExists.call(host, fileName); - }; - - root.content = `import {x} from "f2"`; - host.reloadFS(files); - - // trigger synchronization to make sure that LSHost will try to find 'f2' module on disk - host.runQueuedTimeoutCallbacks(); - - // ensure file has correct number of errors after edit - checkOutputErrorsIncremental(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), root, "f2") - ]); - - assert.isTrue(fileExistsIsCalled); - } - { - let fileExistsCalled = false; - host.fileExists = (fileName): boolean => { - if (fileName === "lib.d.ts") { - return false; - } - fileExistsCalled = true; - assert.isTrue(fileName.indexOf("/f1.") !== -1); - return originalFileExists.call(host, fileName); - }; - - const newContent = `import {x} from "f1"`; - root.content = newContent; - - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - - checkOutputErrorsIncremental(host, [f1IsNotModule, cannotFindFoo]); - assert.isTrue(fileExistsCalled); - } - }); - - it("loads missing files from disk", () => { - const root = { - path: `/a/foo.ts`, - content: `import {x} from "bar"` - }; - - const imported = { - path: `/a/bar.d.ts`, - content: `export const y = 1;` - }; - - const files = [root, libFile]; - const host = createWatchedSystem(files); - const originalFileExists = host.fileExists; - - let fileExistsCalledForBar = false; - host.fileExists = fileName => { - if (fileName === "lib.d.ts") { - return false; - } - if (!fileExistsCalledForBar) { - fileExistsCalledForBar = fileName.indexOf("/bar.") !== -1; - } - - return originalFileExists.call(host, fileName); - }; - - const watch = createWatchOfFilesAndCompilerOptions([root.path], host, { module: ModuleKind.AMD }); - - assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called"); - checkOutputErrorsInitial(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), root, "bar") - ]); - - fileExistsCalledForBar = false; - root.content = `import {y} from "bar"`; - host.reloadFS(files.concat(imported)); - - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - }); - - it("should compile correctly when resolved module goes missing and then comes back (module is not part of the root)", () => { - const root = { - path: `/a/foo.ts`, - content: `import {x} from "bar"` - }; - - const imported = { - path: `/a/bar.d.ts`, - content: `export const y = 1;export const x = 10;` - }; - - const files = [root, libFile]; - const filesWithImported = files.concat(imported); - const host = createWatchedSystem(filesWithImported); - const originalFileExists = host.fileExists; - let fileExistsCalledForBar = false; - host.fileExists = fileName => { - if (fileName === "lib.d.ts") { - return false; - } - if (!fileExistsCalledForBar) { - fileExistsCalledForBar = fileName.indexOf("/bar.") !== -1; - } - return originalFileExists.call(host, fileName); - }; - - const watch = createWatchOfFilesAndCompilerOptions([root.path], host, { module: ModuleKind.AMD }); - - assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called"); - checkOutputErrorsInitial(host, emptyArray); - - fileExistsCalledForBar = false; - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - checkOutputErrorsIncremental(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), root, "bar") - ]); - - fileExistsCalledForBar = false; - host.reloadFS(filesWithImported); - host.checkTimeoutQueueLengthAndRun(1); - checkOutputErrorsIncremental(host, emptyArray); - assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - }); - - it("works when module resolution changes to ambient module", () => { - const root = { - path: "/a/b/foo.ts", - content: `import * as fs from "fs";` - }; - - const packageJson = { - path: "/a/b/node_modules/@types/node/package.json", - content: ` -{ - "main": "" -} -` - }; - - const nodeType = { - path: "/a/b/node_modules/@types/node/index.d.ts", - content: ` -declare module "fs" { - export interface Stats { - isFile(): boolean; - } -}` - }; - - const files = [root, libFile]; - const filesWithNodeType = files.concat(packageJson, nodeType); - const host = createWatchedSystem(files, { currentDirectory: "/a/b" }); - - const watch = createWatchOfFilesAndCompilerOptions([root.path], host, { }); - - checkOutputErrorsInitial(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), root, "fs") - ]); - - host.reloadFS(filesWithNodeType); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("works when included file with ambient module changes", () => { - const root = { - path: "/a/b/foo.ts", - content: ` -import * as fs from "fs"; -import * as u from "url"; -` - }; - - const file = { - path: "/a/b/bar.d.ts", - content: ` -declare module "url" { - export interface Url { - href?: string; - } -} -` - }; - - const fileContentWithFS = ` -declare module "fs" { - export interface Stats { - isFile(): boolean; - } -} -`; - - const files = [root, file, libFile]; - const host = createWatchedSystem(files, { currentDirectory: "/a/b" }); - - const watch = createWatchOfFilesAndCompilerOptions([root.path, file.path], host, {}); - - checkOutputErrorsInitial(host, [ - getDiagnosticModuleNotFoundOfFile(watch(), root, "fs") - ]); - - file.content += fileContentWithFS; - host.reloadFS(files); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray); - }); - - it("works when reusing program with files from external library", () => { - interface ExpectedFile { path: string; isExpectedToEmit?: boolean; content?: string; } - const configDir = "/a/b/projects/myProject/src/"; - const file1: File = { - path: configDir + "file1.ts", - content: 'import module1 = require("module1");\nmodule1("hello");' - }; - const file2: File = { - path: configDir + "file2.ts", - content: 'import module11 = require("module1");\nmodule11("hello");' - }; - const module1: File = { - path: "/a/b/projects/myProject/node_modules/module1/index.js", - content: "module.exports = options => { return options.toString(); }" - }; - const configFile: File = { - path: configDir + "tsconfig.json", - content: JSON.stringify({ - compilerOptions: { - allowJs: true, - rootDir: ".", - outDir: "../dist", - moduleResolution: "node", - maxNodeModuleJsDepth: 1 - } - }) - }; - const outDirFolder = "/a/b/projects/myProject/dist/"; - const programFiles = [file1, file2, module1, libFile]; - const host = createWatchedSystem(programFiles.concat(configFile), { currentDirectory: "/a/b/projects/myProject/" }); - const watch = createWatchOfConfigFile(configFile.path, host); - checkProgramActualFiles(watch(), programFiles.map(f => f.path)); - checkOutputErrorsInitial(host, emptyArray); - const expectedFiles: ExpectedFile[] = [ - createExpectedEmittedFile(file1), - createExpectedEmittedFile(file2), - createExpectedToNotEmitFile("index.js"), - createExpectedToNotEmitFile("src/index.js"), - createExpectedToNotEmitFile("src/file1.js"), - createExpectedToNotEmitFile("src/file2.js"), - createExpectedToNotEmitFile("lib.js"), - createExpectedToNotEmitFile("lib.d.ts") - ]; - verifyExpectedFiles(expectedFiles); - - file1.content += "\n;"; - expectedFiles[0].content += ";\n"; // Only emit file1 with this change - expectedFiles[1].isExpectedToEmit = false; - host.reloadFS(programFiles.concat(configFile)); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), programFiles.map(f => f.path)); - checkOutputErrorsIncremental(host, emptyArray); - verifyExpectedFiles(expectedFiles); - - - function verifyExpectedFiles(expectedFiles: ExpectedFile[]) { - forEach(expectedFiles, f => { - assert.equal(!!host.fileExists(f.path), f.isExpectedToEmit, "File " + f.path + " is expected to " + (f.isExpectedToEmit ? "emit" : "not emit")); - if (f.isExpectedToEmit) { - assert.equal(host.readFile(f.path), f.content, "Expected contents of " + f.path); - } - }); - } - - function createExpectedToNotEmitFile(fileName: string): ExpectedFile { - return { - path: outDirFolder + fileName, - isExpectedToEmit: false - }; - } - - function createExpectedEmittedFile(file: File): ExpectedFile { - return { - path: removeFileExtension(file.path.replace(configDir, outDirFolder)) + Extension.Js, - isExpectedToEmit: true, - content: '"use strict";\nexports.__esModule = true;\n' + file.content.replace("import", "var") + "\n" - }; - } - }); - - it("works when renaming node_modules folder that already contains @types folder", () => { - const currentDirectory = "/user/username/projects/myproject"; - const file: File = { - path: `${currentDirectory}/a.ts`, - content: `import * as q from "qqq";` - }; - const module: File = { - path: `${currentDirectory}/node_modules2/@types/qqq/index.d.ts`, - content: "export {}" - }; - const files = [file, module, libFile]; - const host = createWatchedSystem(files, { currentDirectory }); - const watch = createWatchOfFilesAndCompilerOptions([file.path], host); - - checkProgramActualFiles(watch(), [file.path, libFile.path]); - checkOutputErrorsInitial(host, [getDiagnosticModuleNotFoundOfFile(watch(), file, "qqq")]); - checkWatchedDirectories(host, emptyArray, /*recursive*/ false); - checkWatchedDirectories(host, [`${currentDirectory}/node_modules`, `${currentDirectory}/node_modules/@types`], /*recursive*/ true); - - host.renameFolder(`${currentDirectory}/node_modules2`, `${currentDirectory}/node_modules`); - host.runQueuedTimeoutCallbacks(); - checkProgramActualFiles(watch(), [file.path, libFile.path, `${currentDirectory}/node_modules/@types/qqq/index.d.ts`]); - checkOutputErrorsIncremental(host, emptyArray); - }); - - describe("ignores files/folder changes in node_modules that start with '.'", () => { - const projectPath = "/user/username/projects/project"; - const npmCacheFile: File = { - path: `${projectPath}/node_modules/.cache/babel-loader/89c02171edab901b9926470ba6d5677e.ts`, - content: JSON.stringify({ something: 10 }) - }; - const file1: File = { - path: `${projectPath}/test.ts`, - content: `import { x } from "somemodule";` - }; - const file2: File = { - path: `${projectPath}/node_modules/somemodule/index.d.ts`, - content: `export const x = 10;` - }; - const files = [libFile, file1, file2]; - const expectedFiles = files.map(f => f.path); - it("when watching node_modules in inferred project for failed lookup", () => { - const host = createWatchedSystem(files); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host, {}, /*maxNumberOfFilesToIterateForInvalidation*/ 1); - checkProgramActualFiles(watch(), expectedFiles); - host.checkTimeoutQueueLength(0); - - host.ensureFileOrFolder(npmCacheFile); - host.checkTimeoutQueueLength(0); - }); - it("when watching node_modules as part of wild card directories in config project", () => { - const config: File = { - path: `${projectPath}/tsconfig.json`, - content: "{}" - }; - const host = createWatchedSystem(files.concat(config)); - const watch = createWatchOfConfigFile(config.path, host); - checkProgramActualFiles(watch(), expectedFiles); - host.checkTimeoutQueueLength(0); - - host.ensureFileOrFolder(npmCacheFile); - host.checkTimeoutQueueLength(0); - }); - }); - }); - - describe("tsc-watch with when module emit is specified as node", () => { - it("when instead of filechanged recursive directory watcher is invoked", () => { - const configFile: File = { - path: "/a/rootFolder/project/tsconfig.json", - content: JSON.stringify({ - compilerOptions: { - module: "none", - allowJs: true, - outDir: "Static/scripts/" - }, - include: [ - "Scripts/**/*" - ], - }) - }; - const outputFolder = "/a/rootFolder/project/Static/scripts/"; - const file1: File = { - path: "/a/rootFolder/project/Scripts/TypeScript.ts", - content: "var z = 10;" - }; - const file2: File = { - path: "/a/rootFolder/project/Scripts/Javascript.js", - content: "var zz = 10;" - }; - const files = [configFile, file1, file2, libFile]; - const host = createWatchedSystem(files); - const watch = createWatchOfConfigFile(configFile.path, host); - - checkProgramActualFiles(watch(), mapDefined(files, f => f === configFile ? undefined : f.path)); - file1.content = "var zz30 = 100;"; - host.reloadFS(files, { invokeDirectoryWatcherInsteadOfFileChanged: true }); - host.runQueuedTimeoutCallbacks(); - - checkProgramActualFiles(watch(), mapDefined(files, f => f === configFile ? undefined : f.path)); - const outputFile1 = changeExtension((outputFolder + getBaseFileName(file1.path)), ".js"); - assert.isTrue(host.fileExists(outputFile1)); - assert.equal(host.readFile(outputFile1), file1.content + host.newLine); - }); - }); - - describe("tsc-watch console clearing", () => { - const currentDirectoryLog = "Current directory: / CaseSensitiveFileNames: false\n"; - const fileWatcherAddedLog = [ - "FileWatcher:: Added:: WatchInfo: /f.ts 250 Source file\n", - "FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 Source file\n" - ]; - - const file: File = { - path: "/f.ts", - content: "" - }; - - function getProgramSynchronizingLog(options: CompilerOptions) { - return [ - "Synchronizing program\n", - "CreatingProgramWith::\n", - " roots: [\"/f.ts\"]\n", - ` options: ${JSON.stringify(options)}\n` - ]; - } - - function isConsoleClearDisabled(options: CompilerOptions) { - return options.diagnostics || options.extendedDiagnostics || options.preserveWatchOutput; - } - - function verifyCompilation(host: WatchedSystem, options: CompilerOptions, initialDisableOptions?: CompilerOptions) { - const disableConsoleClear = isConsoleClearDisabled(options); - const hasLog = options.extendedDiagnostics || options.diagnostics; - checkOutputErrorsInitial(host, emptyArray, initialDisableOptions ? isConsoleClearDisabled(initialDisableOptions) : disableConsoleClear, hasLog ? [ - currentDirectoryLog, - ...getProgramSynchronizingLog(options), - ...(options.extendedDiagnostics ? fileWatcherAddedLog : emptyArray) - ] : undefined); - host.modifyFile(file.path, "//"); - host.runQueuedTimeoutCallbacks(); - checkOutputErrorsIncremental(host, emptyArray, disableConsoleClear, hasLog ? [ - "FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 Source file\n", - "Scheduling update\n", - "Elapsed:: 0ms FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 Source file\n" - ] : undefined, hasLog ? getProgramSynchronizingLog(options) : undefined); - } - - function checkConsoleClearingUsingCommandLineOptions(options: CompilerOptions = {}) { - const files = [file, libFile]; - const host = createWatchedSystem(files); - createWatchOfFilesAndCompilerOptions([file.path], host, options); - verifyCompilation(host, options); - } - - it("without --diagnostics or --extendedDiagnostics", () => { - checkConsoleClearingUsingCommandLineOptions(); - }); - it("with --diagnostics", () => { - checkConsoleClearingUsingCommandLineOptions({ - diagnostics: true, - }); - }); - it("with --extendedDiagnostics", () => { - checkConsoleClearingUsingCommandLineOptions({ - extendedDiagnostics: true, - }); - }); - it("with --preserveWatchOutput", () => { - checkConsoleClearingUsingCommandLineOptions({ - preserveWatchOutput: true, - }); - }); - - describe("when preserveWatchOutput is true in config file", () => { - const compilerOptions: CompilerOptions = { - preserveWatchOutput: true - }; - const configFile: File = { - path: "/tsconfig.json", - content: JSON.stringify({ compilerOptions }) - }; - const files = [file, configFile, libFile]; - it("using createWatchOfConfigFile ", () => { - const host = createWatchedSystem(files); - createWatchOfConfigFile(configFile.path, host); - // Initially console is cleared if --preserveOutput is not provided since the config file is yet to be parsed - verifyCompilation(host, compilerOptions, {}); - }); - it("when createWatchProgram is invoked with configFileParseResult on WatchCompilerHostOfConfigFile", () => { - const host = createWatchedSystem(files); - const reportDiagnostic = createDiagnosticReporter(host); - const optionsToExtend: CompilerOptions = {}; - const configParseResult = parseConfigFileWithSystem(configFile.path, optionsToExtend, host, reportDiagnostic)!; - const watchCompilerHost = createWatchCompilerHostOfConfigFile(configParseResult.options.configFilePath!, optionsToExtend, host, /*createProgram*/ undefined, reportDiagnostic, createWatchStatusReporter(host)); - watchCompilerHost.configFileParsingResult = configParseResult; - createWatchProgram(watchCompilerHost); - verifyCompilation(host, compilerOptions); - }); - }); - }); - - describe("tsc-watch with different polling/non polling options", () => { - it("watchFile using dynamic priority polling", () => { - const projectFolder = "/a/username/project"; - const file1: File = { - path: `${projectFolder}/typescript.ts`, - content: "var z = 10;" - }; - const files = [file1, libFile]; - const environmentVariables = createMap(); - environmentVariables.set("TSC_WATCHFILE", "DynamicPriorityPolling"); - const host = createWatchedSystem(files, { environmentVariables }); - const watch = createWatchOfFilesAndCompilerOptions([file1.path], host); - - const initialProgram = watch(); - verifyProgram(); - - const mediumPollingIntervalThreshold = unchangedPollThresholds[PollingInterval.Medium]; - for (let index = 0; index < mediumPollingIntervalThreshold; index++) { - // Transition libFile and file1 to low priority queue - host.checkTimeoutQueueLengthAndRun(1); - assert.deepEqual(watch(), initialProgram); - } - - // Make a change to file - file1.content = "var zz30 = 100;"; - host.reloadFS(files); - - // This should detect change in the file - host.checkTimeoutQueueLengthAndRun(1); - assert.deepEqual(watch(), initialProgram); - - // Callbacks: medium priority + high priority queue and scheduled program update - host.checkTimeoutQueueLengthAndRun(3); - // During this timeout the file would be detected as unchanged - let fileUnchangeDetected = 1; - const newProgram = watch(); - assert.notStrictEqual(newProgram, initialProgram); - - verifyProgram(); - const outputFile1 = changeExtension(file1.path, ".js"); - assert.isTrue(host.fileExists(outputFile1)); - assert.equal(host.readFile(outputFile1), file1.content + host.newLine); - - const newThreshold = unchangedPollThresholds[PollingInterval.Low] + mediumPollingIntervalThreshold; - for (; fileUnchangeDetected < newThreshold; fileUnchangeDetected++) { - // For high + Medium/low polling interval - host.checkTimeoutQueueLengthAndRun(2); - assert.deepEqual(watch(), newProgram); - } - - // Everything goes in high polling interval queue - host.checkTimeoutQueueLengthAndRun(1); - assert.deepEqual(watch(), newProgram); - - function verifyProgram() { - checkProgramActualFiles(watch(), files.map(f => f.path)); - checkWatchedFiles(host, []); - checkWatchedDirectories(host, [], /*recursive*/ false); - checkWatchedDirectories(host, [], /*recursive*/ true); - } - }); - - describe("tsc-watch when watchDirectories implementation", () => { - function verifyRenamingFileInSubFolder(tscWatchDirectory: Tsc_WatchDirectory) { - const projectFolder = "/a/username/project"; - const projectSrcFolder = `${projectFolder}/src`; - const configFile: File = { - path: `${projectFolder}/tsconfig.json`, - content: "{}" - }; - const file: File = { - path: `${projectSrcFolder}/file1.ts`, - content: "" - }; - const programFiles = [file, libFile]; - const files = [file, configFile, libFile]; - const environmentVariables = createMap(); - environmentVariables.set("TSC_WATCHDIRECTORY", tscWatchDirectory); - const host = createWatchedSystem(files, { environmentVariables }); - const watch = createWatchOfConfigFile(configFile.path, host); - const projectFolders = [projectFolder, projectSrcFolder, `${projectFolder}/node_modules/@types`]; - // Watching files config file, file, lib file - const expectedWatchedFiles = files.map(f => f.path); - const expectedWatchedDirectories = tscWatchDirectory === Tsc_WatchDirectory.NonRecursiveWatchDirectory ? projectFolders : emptyArray; - if (tscWatchDirectory === Tsc_WatchDirectory.WatchFile) { - expectedWatchedFiles.push(...projectFolders); - } - - verifyProgram(checkOutputErrorsInitial); - - // Rename the file: - file.path = file.path.replace("file1.ts", "file2.ts"); - expectedWatchedFiles[0] = file.path; - host.reloadFS(files); - if (tscWatchDirectory === Tsc_WatchDirectory.DynamicPolling) { - // With dynamic polling the fs change would be detected only by running timeouts - host.runQueuedTimeoutCallbacks(); - } - // Delayed update program - host.runQueuedTimeoutCallbacks(); - verifyProgram(checkOutputErrorsIncremental); - - function verifyProgram(checkOutputErrors: (host: WatchedSystem, errors: ReadonlyArray) => void) { - checkProgramActualFiles(watch(), programFiles.map(f => f.path)); - checkOutputErrors(host, emptyArray); - - const outputFile = changeExtension(file.path, ".js"); - assert(host.fileExists(outputFile)); - assert.equal(host.readFile(outputFile), file.content); - - checkWatchedDirectories(host, emptyArray, /*recursive*/ true); - - // Watching config file, file, lib file and directories - checkWatchedFilesDetailed(host, expectedWatchedFiles, 1); - checkWatchedDirectoriesDetailed(host, expectedWatchedDirectories, 1, /*recursive*/ false); - } - } - - it("uses watchFile when renaming file in subfolder", () => { - verifyRenamingFileInSubFolder(Tsc_WatchDirectory.WatchFile); - }); - - it("uses non recursive watchDirectory when renaming file in subfolder", () => { - verifyRenamingFileInSubFolder(Tsc_WatchDirectory.NonRecursiveWatchDirectory); - }); - - it("uses non recursive dynamic polling when renaming file in subfolder", () => { - verifyRenamingFileInSubFolder(Tsc_WatchDirectory.DynamicPolling); - }); - - it("when there are symlinks to folders in recursive folders", () => { - const cwd = "/home/user/projects/myproject"; - const file1: File = { - path: `${cwd}/src/file.ts`, - content: `import * as a from "a"` - }; - const tsconfig: File = { - path: `${cwd}/tsconfig.json`, - content: `{ "compilerOptions": { "extendedDiagnostics": true, "traceResolution": true }}` - }; - const realA: File = { - path: `${cwd}/node_modules/reala/index.d.ts`, - content: `export {}` - }; - const realB: File = { - path: `${cwd}/node_modules/realb/index.d.ts`, - content: `export {}` - }; - const symLinkA: SymLink = { - path: `${cwd}/node_modules/a`, - symLink: `${cwd}/node_modules/reala` - }; - const symLinkB: SymLink = { - path: `${cwd}/node_modules/b`, - symLink: `${cwd}/node_modules/realb` - }; - const symLinkBInA: SymLink = { - path: `${cwd}/node_modules/reala/node_modules/b`, - symLink: `${cwd}/node_modules/b` - }; - const symLinkAInB: SymLink = { - path: `${cwd}/node_modules/realb/node_modules/a`, - symLink: `${cwd}/node_modules/a` - }; - const files = [file1, tsconfig, realA, realB, symLinkA, symLinkB, symLinkBInA, symLinkAInB]; - const environmentVariables = createMap(); - environmentVariables.set("TSC_WATCHDIRECTORY", Tsc_WatchDirectory.NonRecursiveWatchDirectory); - const host = createWatchedSystem(files, { environmentVariables, currentDirectory: cwd }); - createWatchOfConfigFile("tsconfig.json", host); - checkWatchedDirectories(host, emptyArray, /*recursive*/ true); - checkWatchedDirectories(host, [cwd, `${cwd}/node_modules`, `${cwd}/node_modules/@types`, `${cwd}/node_modules/reala`, `${cwd}/node_modules/realb`, - `${cwd}/node_modules/reala/node_modules`, `${cwd}/node_modules/realb/node_modules`, `${cwd}/src`], /*recursive*/ false); - }); - }); - }); - - describe("tsc-watch with modules linked to sibling folder", () => { - const projectRoot = "/user/username/projects/project"; - const mainPackageRoot = `${projectRoot}/main`; - const linkedPackageRoot = `${projectRoot}/linked-package`; - const mainFile: File = { - path: `${mainPackageRoot}/index.ts`, - content: "import { Foo } from '@scoped/linked-package'" - }; - const config: File = { - path: `${mainPackageRoot}/tsconfig.json`, - content: JSON.stringify({ - compilerOptions: { module: "commonjs", moduleResolution: "node", baseUrl: ".", rootDir: "." }, - files: ["index.ts"] - }) - }; - const linkedPackageInMain: SymLink = { - path: `${mainPackageRoot}/node_modules/@scoped/linked-package`, - symLink: `${linkedPackageRoot}` - }; - const linkedPackageJson: File = { - path: `${linkedPackageRoot}/package.json`, - content: JSON.stringify({ name: "@scoped/linked-package", version: "0.0.1", types: "dist/index.d.ts", main: "dist/index.js" }) - }; - const linkedPackageIndex: File = { - path: `${linkedPackageRoot}/dist/index.d.ts`, - content: "export * from './other';" - }; - const linkedPackageOther: File = { - path: `${linkedPackageRoot}/dist/other.d.ts`, - content: 'export declare const Foo = "BAR";' - }; - - it("verify watched directories", () => { - const files = [libFile, mainFile, config, linkedPackageInMain, linkedPackageJson, linkedPackageIndex, linkedPackageOther]; - const host = createWatchedSystem(files, { currentDirectory: mainPackageRoot }); - createWatchOfConfigFile("tsconfig.json", host); - checkWatchedFilesDetailed(host, [libFile.path, mainFile.path, config.path, linkedPackageIndex.path, linkedPackageOther.path], 1); - checkWatchedDirectories(host, emptyArray, /*recursive*/ false); - checkWatchedDirectoriesDetailed(host, [`${mainPackageRoot}/@scoped`, `${mainPackageRoot}/node_modules`, linkedPackageRoot, `${mainPackageRoot}/node_modules/@types`, `${projectRoot}/node_modules/@types`], 1, /*recursive*/ true); - }); - }); - - describe("tsc-watch with custom module resolution", () => { - const projectRoot = "/user/username/projects/project"; - const configFileJson: any = { - compilerOptions: { module: "commonjs", resolveJsonModule: true }, - files: ["index.ts"] - }; - const mainFile: File = { - path: `${projectRoot}/index.ts`, - content: "import settings from './settings.json';" - }; - const config: File = { - path: `${projectRoot}/tsconfig.json`, - content: JSON.stringify(configFileJson) - }; - const settingsJson: File = { - path: `${projectRoot}/settings.json`, - content: JSON.stringify({ content: "Print this" }) - }; - - it("verify that module resolution with json extension works when returned without extension", () => { - const files = [libFile, mainFile, config, settingsJson]; - const host = createWatchedSystem(files, { currentDirectory: projectRoot }); - const compilerHost = createWatchCompilerHostOfConfigFile(config.path, {}, host); - const parsedCommandResult = parseJsonConfigFileContent(configFileJson, host, config.path); - compilerHost.resolveModuleNames = (moduleNames, containingFile) => moduleNames.map(m => { - const result = resolveModuleName(m, containingFile, parsedCommandResult.options, compilerHost); - const resolvedModule = result.resolvedModule!; - return { - resolvedFileName: resolvedModule.resolvedFileName, - isExternalLibraryImport: resolvedModule.isExternalLibraryImport, - originalFileName: resolvedModule.originalPath, - }; - }); - const watch = createWatchProgram(compilerHost); - const program = watch.getCurrentProgram().getProgram(); - checkProgramActualFiles(program, [mainFile.path, libFile.path, settingsJson.path]); - }); - }); -} diff --git a/src/testRunner/unittests/tsserverProjectSystem.ts b/src/testRunner/unittests/tsserverProjectSystem.ts deleted file mode 100644 index 019f0db04b454..0000000000000 --- a/src/testRunner/unittests/tsserverProjectSystem.ts +++ /dev/null @@ -1,10970 +0,0 @@ -namespace ts.projectSystem { - import TI = server.typingsInstaller; - import protocol = server.protocol; - import CommandNames = server.CommandNames; - - export import TestServerHost = TestFSWithWatch.TestServerHost; - export type File = TestFSWithWatch.File; - export type SymLink = TestFSWithWatch.SymLink; - export type Folder = TestFSWithWatch.Folder; - export import createServerHost = TestFSWithWatch.createServerHost; - export import checkArray = TestFSWithWatch.checkArray; - export import libFile = TestFSWithWatch.libFile; - export import checkWatchedFiles = TestFSWithWatch.checkWatchedFiles; - export import checkWatchedFilesDetailed = TestFSWithWatch.checkWatchedFilesDetailed; - export import checkWatchedDirectories = TestFSWithWatch.checkWatchedDirectories; - export import checkWatchedDirectoriesDetailed = TestFSWithWatch.checkWatchedDirectoriesDetailed; - import safeList = TestFSWithWatch.safeList; - import Tsc_WatchDirectory = TestFSWithWatch.Tsc_WatchDirectory; - - const outputEventRegex = /Content\-Length: [\d]+\r\n\r\n/; - function mapOutputToJson(s: string) { - return convertToObject( - parseJsonText("json.json", s.replace(outputEventRegex, "")), - [] - ); - } - - export const customTypesMap = { - path: "/typesMap.json", - content: `{ - "typesMap": { - "jquery": { - "match": "jquery(-(\\\\.?\\\\d+)+)?(\\\\.intellisense)?(\\\\.min)?\\\\.js$", - "types": ["jquery"] - }, - "quack": { - "match": "/duckquack-(\\\\d+)\\\\.min\\\\.js", - "types": ["duck-types"] - } - }, - "simpleMap": { - "Bacon": "baconjs", - "bliss": "blissfuljs", - "commander": "commander", - "cordova": "cordova", - "react": "react", - "lodash": "lodash" - } - }` - }; - - export interface PostExecAction { - readonly success: boolean; - readonly callback: TI.RequestCompletedAction; - } - - export const nullLogger: server.Logger = { - close: noop, - hasLevel: () => false, - loggingEnabled: () => false, - perftrc: noop, - info: noop, - msg: noop, - startGroup: noop, - endGroup: noop, - getLogFileName: () => undefined, - }; - - export function createHasErrorMessageLogger() { - let hasErrorMsg = false; - const { close, hasLevel, loggingEnabled, startGroup, endGroup, info, getLogFileName, perftrc } = nullLogger; - const logger: server.Logger = { - close, hasLevel, loggingEnabled, startGroup, endGroup, info, getLogFileName, perftrc, - msg: (s, type) => { - Debug.fail(`Error: ${s}, type: ${type}`); - hasErrorMsg = true; - } - }; - return { logger, hasErrorMsg: () => hasErrorMsg }; - } - - export class TestTypingsInstaller extends TI.TypingsInstaller implements server.ITypingsInstaller { - protected projectService: server.ProjectService; - constructor( - readonly globalTypingsCacheLocation: string, - throttleLimit: number, - installTypingHost: server.ServerHost, - readonly typesRegistry = createMap>(), - log?: TI.Log) { - super(installTypingHost, globalTypingsCacheLocation, safeList.path, customTypesMap.path, throttleLimit, log); - } - - protected postExecActions: PostExecAction[] = []; - - isKnownTypesPackageName = notImplemented; - installPackage = notImplemented; - inspectValue = notImplemented; - - executePendingCommands() { - const actionsToRun = this.postExecActions; - this.postExecActions = []; - for (const action of actionsToRun) { - action.callback(action.success); - } - } - - checkPendingCommands(expectedCount: number) { - assert.equal(this.postExecActions.length, expectedCount, `Expected ${expectedCount} post install actions`); - } - - onProjectClosed = noop; - - attach(projectService: server.ProjectService) { - this.projectService = projectService; - } - - getInstallTypingHost() { - return this.installTypingHost; - } - - installWorker(_requestId: number, _args: string[], _cwd: string, cb: TI.RequestCompletedAction): void { - this.addPostExecAction("success", cb); - } - - sendResponse(response: server.SetTypings | server.InvalidateCachedTypings) { - this.projectService.updateTypingsForProject(response); - } - - enqueueInstallTypingsRequest(project: server.Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray) { - const request = server.createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, this.globalTypingsCacheLocation); - this.install(request); - } - - addPostExecAction(stdout: string | string[], cb: TI.RequestCompletedAction) { - const out = isString(stdout) ? stdout : createNpmPackageJsonString(stdout); - const action: PostExecAction = { - success: !!out, - callback: cb - }; - this.postExecActions.push(action); - } - } - - function createNpmPackageJsonString(installedTypings: string[]): string { - const dependencies: MapLike = {}; - for (const typing of installedTypings) { - dependencies[typing] = "1.0.0"; - } - return JSON.stringify({ dependencies }); - } - - export function createTypesRegistry(...list: string[]): Map> { - const versionMap = { - "latest": "1.3.0", - "ts2.0": "1.0.0", - "ts2.1": "1.0.0", - "ts2.2": "1.2.0", - "ts2.3": "1.3.0", - "ts2.4": "1.3.0", - "ts2.5": "1.3.0", - "ts2.6": "1.3.0", - "ts2.7": "1.3.0" - }; - const map = createMap>(); - for (const l of list) { - map.set(l, versionMap); - } - return map; - } - - function createHostModuleResolutionTrace(host: TestServerHost & ModuleResolutionHost) { - const resolutionTrace: string[] = []; - host.trace = resolutionTrace.push.bind(resolutionTrace); - return resolutionTrace; - } - - export function toExternalFile(fileName: string): protocol.ExternalFile { - return { fileName }; - } - - export function toExternalFiles(fileNames: string[]) { - return map(fileNames, toExternalFile); - } - - export function fileStats(nonZeroStats: Partial): server.FileStats { - return { ts: 0, tsx: 0, dts: 0, js: 0, jsx: 0, deferred: 0, ...nonZeroStats }; - } - - export interface ConfigFileDiagnostic { - fileName: string | undefined; - start: number | undefined; - length: number | undefined; - messageText: string; - category: DiagnosticCategory; - code: number; - reportsUnnecessary?: {}; - source?: string; - relatedInformation?: DiagnosticRelatedInformation[]; - } - - export class TestServerEventManager { - private events: server.ProjectServiceEvent[] = []; - readonly session: TestSession; - readonly service: server.ProjectService; - readonly host: TestServerHost; - constructor(files: File[], suppressDiagnosticEvents?: boolean) { - this.host = createServerHost(files); - this.session = createSession(this.host, { - canUseEvents: true, - eventHandler: event => this.events.push(event), - suppressDiagnosticEvents, - }); - this.service = this.session.getProjectService(); - } - - getEvents(): ReadonlyArray { - const events = this.events; - this.events = []; - return events; - } - - getEvent(eventName: T["eventName"]): T["data"] { - let eventData: T["data"] | undefined; - filterMutate(this.events, e => { - if (e.eventName === eventName) { - if (eventData !== undefined) { - assert(false, "more than one event found"); - } - eventData = e.data; - return false; - } - return true; - }); - return Debug.assertDefined(eventData); - } - - hasZeroEvent(eventName: T["eventName"]) { - this.events.forEach(event => assert.notEqual(event.eventName, eventName)); - } - - checkSingleConfigFileDiagEvent(configFileName: string, triggerFile: string, errors: ReadonlyArray) { - const eventData = this.getEvent(server.ConfigFileDiagEvent); - assert.equal(eventData.configFileName, configFileName); - assert.equal(eventData.triggerFile, triggerFile); - const actual = eventData.diagnostics.map(({ file, messageText, ...rest }) => ({ fileName: file && file.fileName, messageText: isString(messageText) ? messageText : "", ...rest })); - if (errors) { - assert.deepEqual(actual, errors); - } - } - - assertProjectInfoTelemetryEvent(partial: Partial, configFile = "/tsconfig.json"): void { - assert.deepEqual(this.getEvent(server.ProjectInfoTelemetryEvent), { - projectId: sys.createSHA256Hash!(configFile), - fileStats: fileStats({ ts: 1 }), - compilerOptions: {}, - extends: false, - files: false, - include: false, - exclude: false, - compileOnSave: false, - typeAcquisition: { - enable: false, - exclude: false, - include: false, - }, - configFileName: "tsconfig.json", - projectType: "configured", - languageServiceEnabled: true, - version, - ...partial, - }); - } - - assertOpenFileTelemetryEvent(info: server.OpenFileInfo): void { - assert.deepEqual(this.getEvent(server.OpenFileInfoTelemetryEvent), { info }); - } - assertNoOpenFilesTelemetryEvent(): void { - this.hasZeroEvent(server.OpenFileInfoTelemetryEvent); - } - } - - class TestSession extends server.Session { - private seq = 0; - public events: protocol.Event[] = []; - public host: TestServerHost; - - getProjectService() { - return this.projectService; - } - - public getSeq() { - return this.seq; - } - - public getNextSeq() { - return this.seq + 1; - } - - public executeCommandSeq(request: Partial) { - this.seq++; - request.seq = this.seq; - request.type = "request"; - return this.executeCommand(request); - } - - public event(body: T, eventName: string) { - this.events.push(server.toEvent(eventName, body)); - super.event(body, eventName); - } - - public clearMessages() { - clear(this.events); - this.host.clearOutput(); - } - } - - export function createSession(host: server.ServerHost, opts: Partial = {}) { - if (opts.typingsInstaller === undefined) { - opts.typingsInstaller = new TestTypingsInstaller("/a/data/", /*throttleLimit*/ 5, host); - } - - if (opts.eventHandler !== undefined) { - opts.canUseEvents = true; - } - - const sessionOptions: server.SessionOptions = { - host, - cancellationToken: server.nullCancellationToken, - useSingleInferredProject: false, - useInferredProjectPerProjectRoot: false, - typingsInstaller: undefined!, // TODO: GH#18217 - byteLength: Utils.byteLength, - hrtime: process.hrtime, - logger: opts.logger || createHasErrorMessageLogger().logger, - canUseEvents: false - }; - - return new TestSession({ ...sessionOptions, ...opts }); - } - - function createSessionWithEventTracking(host: server.ServerHost, eventName: T["eventName"], ...eventNames: T["eventName"][]) { - const events: T[] = []; - const session = createSession(host, { - eventHandler: e => { - if (e.eventName === eventName || eventNames.some(eventName => e.eventName === eventName)) { - events.push(e as T); - } - } - }); - - return { session, events }; - } - - function createSessionWithDefaultEventHandler(host: TestServerHost, eventNames: T["event"] | T["event"][], opts: Partial = {}) { - const session = createSession(host, { canUseEvents: true, ...opts }); - - return { - session, - getEvents, - clearEvents - }; - - function getEvents() { - return mapDefined(host.getOutput(), s => { - const e = mapOutputToJson(s); - return (isArray(eventNames) ? eventNames.some(eventName => e.event === eventName) : e.event === eventNames) ? e as T : undefined; - }); - } - - function clearEvents() { - session.clearMessages(); - } - } - - interface CreateProjectServiceParameters { - cancellationToken?: HostCancellationToken; - logger?: server.Logger; - useSingleInferredProject?: boolean; - typingsInstaller?: server.ITypingsInstaller; - eventHandler?: server.ProjectServiceEventHandler; - } - - export class TestProjectService extends server.ProjectService { - constructor(host: server.ServerHost, logger: server.Logger, cancellationToken: HostCancellationToken, useSingleInferredProject: boolean, - typingsInstaller: server.ITypingsInstaller, eventHandler: server.ProjectServiceEventHandler, opts: Partial = {}) { - super({ - host, - logger, - cancellationToken, - useSingleInferredProject, - useInferredProjectPerProjectRoot: false, - typingsInstaller, - typesMapLocation: customTypesMap.path, - eventHandler, - ...opts - }); - } - - checkNumberOfProjects(count: { inferredProjects?: number, configuredProjects?: number, externalProjects?: number }) { - checkNumberOfProjects(this, count); - } - } - export function createProjectService(host: server.ServerHost, parameters: CreateProjectServiceParameters = {}, options?: Partial) { - const cancellationToken = parameters.cancellationToken || server.nullCancellationToken; - const logger = parameters.logger || createHasErrorMessageLogger().logger; - const useSingleInferredProject = parameters.useSingleInferredProject !== undefined ? parameters.useSingleInferredProject : false; - return new TestProjectService(host, logger, cancellationToken, useSingleInferredProject, parameters.typingsInstaller!, parameters.eventHandler!, options); // TODO: GH#18217 - } - - export function checkNumberOfConfiguredProjects(projectService: server.ProjectService, expected: number) { - assert.equal(projectService.configuredProjects.size, expected, `expected ${expected} configured project(s)`); - } - - function checkNumberOfExternalProjects(projectService: server.ProjectService, expected: number) { - assert.equal(projectService.externalProjects.length, expected, `expected ${expected} external project(s)`); - } - - function checkNumberOfInferredProjects(projectService: server.ProjectService, expected: number) { - assert.equal(projectService.inferredProjects.length, expected, `expected ${expected} inferred project(s)`); - } - - export function checkNumberOfProjects(projectService: server.ProjectService, count: { inferredProjects?: number, configuredProjects?: number, externalProjects?: number }) { - checkNumberOfConfiguredProjects(projectService, count.configuredProjects || 0); - checkNumberOfExternalProjects(projectService, count.externalProjects || 0); - checkNumberOfInferredProjects(projectService, count.inferredProjects || 0); - } - - export function configuredProjectAt(projectService: server.ProjectService, index: number) { - const values = projectService.configuredProjects.values(); - while (index > 0) { - values.next(); - index--; - } - return values.next().value; - } - - export function checkProjectActualFiles(project: server.Project, expectedFiles: ReadonlyArray) { - checkArray(`${server.ProjectKind[project.projectKind]} project, actual files`, project.getFileNames(), expectedFiles); - } - - function checkProjectRootFiles(project: server.Project, expectedFiles: ReadonlyArray) { - checkArray(`${server.ProjectKind[project.projectKind]} project, rootFileNames`, project.getRootFiles(), expectedFiles); - } - - function mapCombinedPathsInAncestor(dir: string, path2: string, mapAncestor: (ancestor: string) => boolean) { - dir = normalizePath(dir); - const result: string[] = []; - forEachAncestorDirectory(dir, ancestor => { - if (mapAncestor(ancestor)) { - result.push(combinePaths(ancestor, path2)); - } - }); - return result; - } - - function getRootsToWatchWithAncestorDirectory(dir: string, path2: string) { - return mapCombinedPathsInAncestor(dir, path2, ancestor => ancestor.split(directorySeparator).length > 4); - } - - const nodeModules = "node_modules"; - function getNodeModuleDirectories(dir: string) { - return getRootsToWatchWithAncestorDirectory(dir, nodeModules); - } - - export const nodeModulesAtTypes = "node_modules/@types"; - export function getTypeRootsFromLocation(currentDirectory: string) { - return getRootsToWatchWithAncestorDirectory(currentDirectory, nodeModulesAtTypes); - } - - function getNumberOfWatchesInvokedForRecursiveWatches(recursiveWatchedDirs: string[], file: string) { - return countWhere(recursiveWatchedDirs, dir => file.length > dir.length && startsWith(file, dir) && file[dir.length] === directorySeparator); - } - - function checkOpenFiles(projectService: server.ProjectService, expectedFiles: File[]) { - checkArray("Open files", arrayFrom(projectService.openFiles.keys(), path => projectService.getScriptInfoForPath(path as Path)!.fileName), expectedFiles.map(file => file.path)); - } - - function protocolLocationFromSubstring(str: string, substring: string): protocol.Location { - const start = str.indexOf(substring); - Debug.assert(start !== -1); - return protocolToLocation(str)(start); - } - function protocolToLocation(text: string): (pos: number) => protocol.Location { - const lineStarts = computeLineStarts(text); - return pos => { - const x = computeLineAndCharacterOfPosition(lineStarts, pos); - return { line: x.line + 1, offset: x.character + 1 }; - }; - } - function protocolTextSpanFromSubstring(str: string, substring: string, options?: SpanFromSubstringOptions): protocol.TextSpan { - const span = textSpanFromSubstring(str, substring, options); - const toLocation = protocolToLocation(str); - return { start: toLocation(span.start), end: toLocation(textSpanEnd(span)) }; - } - function protocolRenameSpanFromSubstring( - str: string, - substring: string, - options?: SpanFromSubstringOptions, - prefixSuffixText?: { readonly prefixText?: string, readonly suffixText?: string }, - ): protocol.RenameTextSpan { - return { ...protocolTextSpanFromSubstring(str, substring, options), ...prefixSuffixText }; - } - function textSpanFromSubstring(str: string, substring: string, options?: SpanFromSubstringOptions): TextSpan { - const start = nthIndexOf(str, substring, options ? options.index : 0); - Debug.assert(start !== -1); - return createTextSpan(start, substring.length); - } - function protocolFileLocationFromSubstring(file: File, substring: string): protocol.FileLocationRequestArgs { - return { file: file.path, ...protocolLocationFromSubstring(file.content, substring) }; - } - function protocolFileSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions): protocol.FileSpan { - return { file: file.path, ...protocolTextSpanFromSubstring(file.content, substring, options) }; - } - function documentSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions): DocumentSpan { - return { fileName: file.path, textSpan: textSpanFromSubstring(file.content, substring, options) }; - } - function renameLocation(file: File, substring: string, options?: SpanFromSubstringOptions): RenameLocation { - return documentSpanFromSubstring(file, substring, options); - } - interface SpanFromSubstringOptions { - readonly index: number; - } - - function nthIndexOf(str: string, substr: string, n: number): number { - let index = -1; - for (; n >= 0; n--) { - index = str.indexOf(substr, index + 1); - if (index === -1) return -1; - } - return index; - } - - /** - * Test server cancellation token used to mock host token cancellation requests. - * The cancelAfterRequest constructor param specifies how many isCancellationRequested() calls - * should be made before canceling the token. The id of the request to cancel should be set with - * setRequestToCancel(); - */ - export class TestServerCancellationToken implements server.ServerCancellationToken { - private currentId: number | undefined = -1; - private requestToCancel = -1; - private isCancellationRequestedCount = 0; - - constructor(private cancelAfterRequest = 0) { - } - - setRequest(requestId: number) { - this.currentId = requestId; - } - - setRequestToCancel(requestId: number) { - this.resetToken(); - this.requestToCancel = requestId; - } - - resetRequest(requestId: number) { - assert.equal(requestId, this.currentId, "unexpected request id in cancellation"); - this.currentId = undefined; - } - - isCancellationRequested() { - this.isCancellationRequestedCount++; - // If the request id is the request to cancel and isCancellationRequestedCount - // has been met then cancel the request. Ex: cancel the request if it is a - // nav bar request & isCancellationRequested() has already been called three times. - return this.requestToCancel === this.currentId && this.isCancellationRequestedCount >= this.cancelAfterRequest; - } - - resetToken() { - this.currentId = -1; - this.isCancellationRequestedCount = 0; - this.requestToCancel = -1; - } - } - - export function makeSessionRequest(command: string, args: T): protocol.Request { - return { - seq: 0, - type: "request", - command, - arguments: args - }; - } - - export function executeSessionRequest(session: server.Session, command: TRequest["command"], args: TRequest["arguments"]): TResponse["body"] { - return session.executeCommand(makeSessionRequest(command, args)).response as TResponse["body"]; - } - - export function executeSessionRequestNoResponse(session: server.Session, command: TRequest["command"], args: TRequest["arguments"]): void { - session.executeCommand(makeSessionRequest(command, args)); - } - - export function openFilesForSession(files: ReadonlyArray, session: server.Session): void { - for (const file of files) { - session.executeCommand(makeSessionRequest(CommandNames.Open, - "projectRootPath" in file ? { file: typeof file.file === "string" ? file.file : file.file.path, projectRootPath: file.projectRootPath } : { file: file.path })); - } - } - - export function closeFilesForSession(files: ReadonlyArray, session: server.Session): void { - for (const file of files) { - session.executeCommand(makeSessionRequest(CommandNames.Close, { file: file.path })); - } - } - - interface ErrorInformation { - diagnosticMessage: DiagnosticMessage; - errorTextArguments?: string[]; - } - - function getProtocolDiagnosticMessage({ diagnosticMessage, errorTextArguments = [] }: ErrorInformation) { - return formatStringFromArgs(diagnosticMessage.message, errorTextArguments); - } - - function verifyDiagnostics(actual: server.protocol.Diagnostic[], expected: ErrorInformation[]) { - const expectedErrors = expected.map(getProtocolDiagnosticMessage); - assert.deepEqual(actual.map(diag => flattenDiagnosticMessageText(diag.text, "\n")), expectedErrors); - } - - function verifyNoDiagnostics(actual: server.protocol.Diagnostic[]) { - verifyDiagnostics(actual, []); - } - - function checkErrorMessage(session: TestSession, eventName: protocol.DiagnosticEventKind, diagnostics: protocol.DiagnosticEventBody, isMostRecent = false): void { - checkNthEvent(session, server.toEvent(eventName, diagnostics), 0, isMostRecent); - } - - function createDiagnostic(start: protocol.Location, end: protocol.Location, message: DiagnosticMessage, args: ReadonlyArray = [], category = diagnosticCategoryName(message), reportsUnnecessary?: {}, relatedInformation?: protocol.DiagnosticRelatedInformation[]): protocol.Diagnostic { - return { start, end, text: formatStringFromArgs(message.message, args), code: message.code, category, reportsUnnecessary, relatedInformation, source: undefined }; - } - - function checkCompleteEvent(session: TestSession, numberOfCurrentEvents: number, expectedSequenceId: number, isMostRecent = true): void { - checkNthEvent(session, server.toEvent("requestCompleted", { request_seq: expectedSequenceId }), numberOfCurrentEvents - 1, isMostRecent); - } - - function checkProjectUpdatedInBackgroundEvent(session: TestSession, openFiles: string[]) { - checkNthEvent(session, server.toEvent("projectsUpdatedInBackground", { openFiles }), 0, /*isMostRecent*/ true); - } - - function checkNoDiagnosticEvents(session: TestSession) { - for (const event of session.events) { - assert.isFalse(event.event.endsWith("Diag"), JSON.stringify(event)); - } - } - - function checkNthEvent(session: TestSession, expectedEvent: protocol.Event, index: number, isMostRecent: boolean) { - const events = session.events; - assert.deepEqual(events[index], expectedEvent, `Expected ${JSON.stringify(expectedEvent)} at ${index} in ${JSON.stringify(events)}`); - - const outputs = session.host.getOutput(); - assert.equal(outputs[index], server.formatMessage(expectedEvent, nullLogger, Utils.byteLength, session.host.newLine)); - - if (isMostRecent) { - assert.strictEqual(events.length, index + 1, JSON.stringify(events)); - assert.strictEqual(outputs.length, index + 1, JSON.stringify(outputs)); - } - } - - describe("tsserverProjectSystem general functionality", () => { - const commonFile1: File = { - path: "/a/b/commonFile1.ts", - content: "let x = 1" - }; - const commonFile2: File = { - path: "/a/b/commonFile2.ts", - content: "let y = 1" - }; - - it("create inferred project", () => { - const appFile: File = { - path: "/a/b/c/app.ts", - content: ` - import {f} from "./module" - console.log(f) - ` - }; - - const moduleFile: File = { - path: "/a/b/c/module.d.ts", - content: `export let x: number` - }; - const host = createServerHost([appFile, moduleFile, libFile]); - const projectService = createProjectService(host); - const { configFileName } = projectService.openClientFile(appFile.path); - - assert(!configFileName, `should not find config, got: '${configFileName}`); - checkNumberOfConfiguredProjects(projectService, 0); - checkNumberOfInferredProjects(projectService, 1); - - const project = projectService.inferredProjects[0]; - - checkArray("inferred project", project.getFileNames(), [appFile.path, libFile.path, moduleFile.path]); - const configFileLocations = ["/a/b/c/", "/a/b/", "/a/", "/"]; - const configFiles = flatMap(configFileLocations, location => [location + "tsconfig.json", location + "jsconfig.json"]); - checkWatchedFiles(host, configFiles.concat(libFile.path, moduleFile.path)); - checkWatchedDirectories(host, ["/a/b/c"], /*recursive*/ false); - checkWatchedDirectories(host, [combinePaths(getDirectoryPath(appFile.path), nodeModulesAtTypes)], /*recursive*/ true); - }); - - describe("can handle tsconfig file name with difference casing", () => { - function verifyConfigFileCasing(lazyConfiguredProjectsFromExternalProject: boolean) { - const f1 = { - path: "/a/b/app.ts", - content: "let x = 1" - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ - include: [] - }) - }; - - const host = createServerHost([f1, config], { useCaseSensitiveFileNames: false }); - const service = createProjectService(host); - service.setHostConfiguration({ preferences: { lazyConfiguredProjectsFromExternalProject } }); - const upperCaseConfigFilePath = combinePaths(getDirectoryPath(config.path).toUpperCase(), getBaseFileName(config.path)); - service.openExternalProject({ - projectFileName: "/a/b/project.csproj", - rootFiles: toExternalFiles([f1.path, upperCaseConfigFilePath]), - options: {} - }); - service.checkNumberOfProjects({ configuredProjects: 1 }); - const project = service.configuredProjects.get(config.path)!; - if (lazyConfiguredProjectsFromExternalProject) { - assert.equal(project.pendingReload, ConfigFileProgramReloadLevel.Full); // External project referenced configured project pending to be reloaded - checkProjectActualFiles(project, emptyArray); - } - else { - assert.equal(project.pendingReload, ConfigFileProgramReloadLevel.None); // External project referenced configured project loaded - checkProjectActualFiles(project, [upperCaseConfigFilePath]); - } - - service.openClientFile(f1.path); - service.checkNumberOfProjects({ configuredProjects: 1, inferredProjects: 1 }); - - assert.equal(project.pendingReload, ConfigFileProgramReloadLevel.None); // External project referenced configured project is updated - checkProjectActualFiles(project, [upperCaseConfigFilePath]); - checkProjectActualFiles(service.inferredProjects[0], [f1.path]); - } - - it("when lazyConfiguredProjectsFromExternalProject not set", () => { - verifyConfigFileCasing(/*lazyConfiguredProjectsFromExternalProject*/ false); - }); - - it("when lazyConfiguredProjectsFromExternalProject is set", () => { - verifyConfigFileCasing(/*lazyConfiguredProjectsFromExternalProject*/ true); - }); - }); - - it("create configured project without file list", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: ` - { - "compilerOptions": {}, - "exclude": [ - "e" - ] - }` - }; - const file1: File = { - path: "/a/b/c/f1.ts", - content: "let x = 1" - }; - const file2: File = { - path: "/a/b/d/f2.ts", - content: "let y = 1" - }; - const file3: File = { - path: "/a/b/e/f3.ts", - content: "let z = 1" - }; - - const host = createServerHost([configFile, libFile, file1, file2, file3]); - const projectService = createProjectService(host); - const { configFileName, configFileErrors } = projectService.openClientFile(file1.path); - - assert(configFileName, "should find config file"); - assert.isTrue(!configFileErrors || configFileErrors.length === 0, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); - checkNumberOfInferredProjects(projectService, 0); - checkNumberOfConfiguredProjects(projectService, 1); - - const project = configuredProjectAt(projectService, 0); - checkProjectActualFiles(project, [file1.path, libFile.path, file2.path, configFile.path]); - checkProjectRootFiles(project, [file1.path, file2.path]); - // watching all files except one that was open - checkWatchedFiles(host, [configFile.path, file2.path, libFile.path]); - const configFileDirectory = getDirectoryPath(configFile.path); - checkWatchedDirectories(host, [configFileDirectory, combinePaths(configFileDirectory, nodeModulesAtTypes)], /*recursive*/ true); - }); - - it("create configured project with the file list", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: ` - { - "compilerOptions": {}, - "include": ["*.ts"] - }` - }; - const file1: File = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2: File = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const file3: File = { - path: "/a/b/c/f3.ts", - content: "let z = 1" - }; - - const host = createServerHost([configFile, libFile, file1, file2, file3]); - const projectService = createProjectService(host); - const { configFileName, configFileErrors } = projectService.openClientFile(file1.path); - - assert(configFileName, "should find config file"); - assert.isTrue(!configFileErrors || configFileErrors.length === 0, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); - checkNumberOfInferredProjects(projectService, 0); - checkNumberOfConfiguredProjects(projectService, 1); - - const project = configuredProjectAt(projectService, 0); - checkProjectActualFiles(project, [file1.path, libFile.path, file2.path, configFile.path]); - checkProjectRootFiles(project, [file1.path, file2.path]); - // watching all files except one that was open - checkWatchedFiles(host, [configFile.path, file2.path, libFile.path]); - checkWatchedDirectories(host, [getDirectoryPath(configFile.path)], /*recursive*/ false); - }); - - it("add and then remove a config file in a folder with loose files", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "files": ["commonFile1.ts"] - }` - }; - const filesWithoutConfig = [libFile, commonFile1, commonFile2]; - const host = createServerHost(filesWithoutConfig); - - const filesWithConfig = [libFile, commonFile1, commonFile2, configFile]; - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - projectService.openClientFile(commonFile2.path); - - projectService.checkNumberOfProjects({ inferredProjects: 2 }); - checkProjectActualFiles(projectService.inferredProjects[0], [commonFile1.path, libFile.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [commonFile2.path, libFile.path]); - - const configFileLocations = ["/", "/a/", "/a/b/"]; - const watchedFiles = flatMap(configFileLocations, location => [location + "tsconfig.json", location + "jsconfig.json"]).concat(libFile.path); - checkWatchedFiles(host, watchedFiles); - - // Add a tsconfig file - host.reloadFS(filesWithConfig); - host.checkTimeoutQueueLengthAndRun(2); // load configured project from disk + ensureProjectsForOpenFiles - - projectService.checkNumberOfProjects({ inferredProjects: 2, configuredProjects: 1 }); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - checkProjectActualFiles(projectService.inferredProjects[1], [commonFile2.path, libFile.path]); - checkProjectActualFiles(projectService.configuredProjects.get(configFile.path)!, [libFile.path, commonFile1.path, configFile.path]); - - checkWatchedFiles(host, watchedFiles); - - // remove the tsconfig file - host.reloadFS(filesWithoutConfig); - - projectService.checkNumberOfProjects({ inferredProjects: 2 }); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - checkProjectActualFiles(projectService.inferredProjects[1], [commonFile2.path, libFile.path]); - - host.checkTimeoutQueueLengthAndRun(1); // Refresh inferred projects - - projectService.checkNumberOfProjects({ inferredProjects: 2 }); - checkProjectActualFiles(projectService.inferredProjects[0], [commonFile1.path, libFile.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [commonFile2.path, libFile.path]); - checkWatchedFiles(host, watchedFiles); - }); - - it("add new files to a configured project without file list", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{}` - }; - const host = createServerHost([commonFile1, libFile, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - const configFileDir = getDirectoryPath(configFile.path); - checkWatchedDirectories(host, [configFileDir, combinePaths(configFileDir, nodeModulesAtTypes)], /*recursive*/ true); - checkNumberOfConfiguredProjects(projectService, 1); - - const project = configuredProjectAt(projectService, 0); - checkProjectRootFiles(project, [commonFile1.path]); - - // add a new ts file - host.reloadFS([commonFile1, commonFile2, libFile, configFile]); - host.checkTimeoutQueueLengthAndRun(2); - // project service waits for 250ms to update the project structure, therefore the assertion needs to wait longer. - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - }); - - it("should ignore non-existing files specified in the config file", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "files": [ - "commonFile1.ts", - "commonFile3.ts" - ] - }` - }; - const host = createServerHost([commonFile1, commonFile2, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - projectService.openClientFile(commonFile2.path); - - checkNumberOfConfiguredProjects(projectService, 1); - const project = configuredProjectAt(projectService, 0); - checkProjectRootFiles(project, [commonFile1.path]); - checkNumberOfInferredProjects(projectService, 1); - }); - - it("remove not-listed external projects", () => { - const f1 = { - path: "/a/app.ts", - content: "let x = 1" - }; - const f2 = { - path: "/b/app.ts", - content: "let x = 1" - }; - const f3 = { - path: "/c/app.ts", - content: "let x = 1" - }; - const makeProject = (f: File) => ({ projectFileName: f.path + ".csproj", rootFiles: [toExternalFile(f.path)], options: {} }); - const p1 = makeProject(f1); - const p2 = makeProject(f2); - const p3 = makeProject(f3); - - const host = createServerHost([f1, f2, f3]); - const session = createSession(host); - - session.executeCommand({ - seq: 1, - type: "request", - command: "openExternalProjects", - arguments: { projects: [p1, p2] } - }); - - const projectService = session.getProjectService(); - checkNumberOfProjects(projectService, { externalProjects: 2 }); - assert.equal(projectService.externalProjects[0].getProjectName(), p1.projectFileName); - assert.equal(projectService.externalProjects[1].getProjectName(), p2.projectFileName); - - session.executeCommand({ - seq: 2, - type: "request", - command: "openExternalProjects", - arguments: { projects: [p1, p3] } - }); - checkNumberOfProjects(projectService, { externalProjects: 2 }); - assert.equal(projectService.externalProjects[0].getProjectName(), p1.projectFileName); - assert.equal(projectService.externalProjects[1].getProjectName(), p3.projectFileName); - - session.executeCommand({ - seq: 3, - type: "request", - command: "openExternalProjects", - arguments: { projects: [] } - }); - checkNumberOfProjects(projectService, { externalProjects: 0 }); - - session.executeCommand({ - seq: 3, - type: "request", - command: "openExternalProjects", - arguments: { projects: [p2] } - }); - assert.equal(projectService.externalProjects[0].getProjectName(), p2.projectFileName); - }); - - it("handle recreated files correctly", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{}` - }; - const host = createServerHost([commonFile1, commonFile2, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - - checkNumberOfConfiguredProjects(projectService, 1); - const project = configuredProjectAt(projectService, 0); - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - - // delete commonFile2 - host.reloadFS([commonFile1, configFile]); - host.checkTimeoutQueueLengthAndRun(2); - checkProjectRootFiles(project, [commonFile1.path]); - - // re-add commonFile2 - host.reloadFS([commonFile1, commonFile2, configFile]); - host.checkTimeoutQueueLengthAndRun(2); - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - }); - - it("handles the missing files - that were added to program because they were added with /// { - const file1: File = { - path: "/a/b/commonFile1.ts", - content: `/// - let x = y` - }; - const host = createServerHost([file1, libFile]); - const session = createSession(host); - openFilesForSession([file1], session); - const projectService = session.getProjectService(); - - checkNumberOfInferredProjects(projectService, 1); - const project = projectService.inferredProjects[0]; - checkProjectRootFiles(project, [file1.path]); - checkProjectActualFiles(project, [file1.path, libFile.path]); - const getErrRequest = makeSessionRequest( - server.CommandNames.SemanticDiagnosticsSync, - { file: file1.path } - ); - - // Two errors: CommonFile2 not found and cannot find name y - let diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; - verifyDiagnostics(diags, [ - { diagnosticMessage: Diagnostics.Cannot_find_name_0, errorTextArguments: ["y"] }, - { diagnosticMessage: Diagnostics.File_0_not_found, errorTextArguments: [commonFile2.path] } - ]); - - host.reloadFS([file1, commonFile2, libFile]); - host.runQueuedTimeoutCallbacks(); - checkNumberOfInferredProjects(projectService, 1); - assert.strictEqual(projectService.inferredProjects[0], project, "Inferred project should be same"); - checkProjectRootFiles(project, [file1.path]); - checkProjectActualFiles(project, [file1.path, libFile.path, commonFile2.path]); - diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[]; - verifyNoDiagnostics(diags); - }); - - it("should create new inferred projects for files excluded from a configured project", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "files": ["${commonFile1.path}", "${commonFile2.path}"] - }` - }; - const files = [commonFile1, commonFile2, configFile]; - const host = createServerHost(files); - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - - const project = configuredProjectAt(projectService, 0); - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - configFile.content = `{ - "compilerOptions": {}, - "files": ["${commonFile1.path}"] - }`; - host.reloadFS(files); - - checkNumberOfConfiguredProjects(projectService, 1); - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - host.checkTimeoutQueueLengthAndRun(2); // Update the configured project + refresh inferred projects - checkNumberOfConfiguredProjects(projectService, 1); - checkProjectRootFiles(project, [commonFile1.path]); - - projectService.openClientFile(commonFile2.path); - checkNumberOfInferredProjects(projectService, 1); - }); - - it("files explicitly excluded in config file", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": {}, - "exclude": ["/a/c"] - }` - }; - const excludedFile1: File = { - path: "/a/c/excluedFile1.ts", - content: `let t = 1;` - }; - - const host = createServerHost([commonFile1, commonFile2, excludedFile1, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(commonFile1.path); - checkNumberOfConfiguredProjects(projectService, 1); - const project = configuredProjectAt(projectService, 0); - checkProjectRootFiles(project, [commonFile1.path, commonFile2.path]); - projectService.openClientFile(excludedFile1.path); - checkNumberOfInferredProjects(projectService, 1); - }); - - it("should properly handle module resolution changes in config file", () => { - const file1: File = { - path: "/a/b/file1.ts", - content: `import { T } from "module1";` - }; - const nodeModuleFile: File = { - path: "/a/b/node_modules/module1.ts", - content: `export interface T {}` - }; - const classicModuleFile: File = { - path: "/a/module1.ts", - content: `export interface T {}` - }; - const randomFile: File = { - path: "/a/file1.ts", - content: `export interface T {}` - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "moduleResolution": "node" - }, - "files": ["${file1.path}"] - }` - }; - const files = [file1, nodeModuleFile, classicModuleFile, configFile, randomFile]; - const host = createServerHost(files); - const projectService = createProjectService(host); - projectService.openClientFile(file1.path); - projectService.openClientFile(nodeModuleFile.path); - projectService.openClientFile(classicModuleFile.path); - - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 1 }); - const project = configuredProjectAt(projectService, 0); - const inferredProject0 = projectService.inferredProjects[0]; - checkProjectActualFiles(project, [file1.path, nodeModuleFile.path, configFile.path]); - checkProjectActualFiles(projectService.inferredProjects[0], [classicModuleFile.path]); - - configFile.content = `{ - "compilerOptions": { - "moduleResolution": "classic" - }, - "files": ["${file1.path}"] - }`; - host.reloadFS(files); - host.checkTimeoutQueueLengthAndRun(2); - - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 2 }); // will not remove project 1 - checkProjectActualFiles(project, [file1.path, classicModuleFile.path, configFile.path]); - assert.strictEqual(projectService.inferredProjects[0], inferredProject0); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - const inferredProject1 = projectService.inferredProjects[1]; - checkProjectActualFiles(projectService.inferredProjects[1], [nodeModuleFile.path]); - - // Open random file and it will reuse first inferred project - projectService.openClientFile(randomFile.path); - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 2 }); - checkProjectActualFiles(project, [file1.path, classicModuleFile.path, configFile.path]); - assert.strictEqual(projectService.inferredProjects[0], inferredProject0); - checkProjectActualFiles(projectService.inferredProjects[0], [randomFile.path]); // Reuses first inferred project - assert.strictEqual(projectService.inferredProjects[1], inferredProject1); - checkProjectActualFiles(projectService.inferredProjects[1], [nodeModuleFile.path]); - }); - - it("should keep the configured project when the opened file is referenced by the project but not its root", () => { - const file1: File = { - path: "/a/b/main.ts", - content: "import { objA } from './obj-a';" - }; - const file2: File = { - path: "/a/b/obj-a.ts", - content: `export const objA = Object.assign({foo: "bar"}, {bar: "baz"});` - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6" - }, - "files": [ "main.ts" ] - }` - }; - const host = createServerHost([file1, file2, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(file1.path); - projectService.closeClientFile(file1.path); - projectService.openClientFile(file2.path); - checkNumberOfConfiguredProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - }); - - it("should keep the configured project when the opened file is referenced by the project but not its root", () => { - const file1: File = { - path: "/a/b/main.ts", - content: "import { objA } from './obj-a';" - }; - const file2: File = { - path: "/a/b/obj-a.ts", - content: `export const objA = Object.assign({foo: "bar"}, {bar: "baz"});` - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6" - }, - "files": [ "main.ts" ] - }` - }; - const host = createServerHost([file1, file2, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(file1.path); - projectService.closeClientFile(file1.path); - projectService.openClientFile(file2.path); - checkNumberOfConfiguredProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - }); - it("should tolerate config file errors and still try to build a project", () => { - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6", - "allowAnything": true - }, - "someOtherProperty": {} - }` - }; - const host = createServerHost([commonFile1, commonFile2, libFile, configFile]); - const projectService = createProjectService(host); - projectService.openClientFile(commonFile1.path); - checkNumberOfConfiguredProjects(projectService, 1); - checkProjectRootFiles(configuredProjectAt(projectService, 0), [commonFile1.path, commonFile2.path]); - }); - - it("should disable features when the files are too large", () => { - const file1 = { - path: "/a/b/f1.js", - content: "let x =1;", - fileSize: 10 * 1024 * 1024 - }; - const file2 = { - path: "/a/b/f2.js", - content: "let y =1;", - fileSize: 6 * 1024 * 1024 - }; - const file3 = { - path: "/a/b/f3.js", - content: "let y =1;", - fileSize: 6 * 1024 * 1024 - }; - - const proj1name = "proj1", proj2name = "proj2", proj3name = "proj3"; - - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openExternalProject({ rootFiles: toExternalFiles([file1.path]), options: {}, projectFileName: proj1name }); - const proj1 = projectService.findProject(proj1name)!; - assert.isTrue(proj1.languageServiceEnabled); - - projectService.openExternalProject({ rootFiles: toExternalFiles([file2.path]), options: {}, projectFileName: proj2name }); - const proj2 = projectService.findProject(proj2name)!; - assert.isTrue(proj2.languageServiceEnabled); - - projectService.openExternalProject({ rootFiles: toExternalFiles([file3.path]), options: {}, projectFileName: proj3name }); - const proj3 = projectService.findProject(proj3name)!; - assert.isFalse(proj3.languageServiceEnabled); - }); - - it("should use only one inferred project if 'useOneInferredProject' is set", () => { - const file1 = { - path: "/a/b/main.ts", - content: "let x =1;" - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6" - }, - "files": [ "main.ts" ] - }` - }; - const file2 = { - path: "/a/c/main.ts", - content: "let x =1;" - }; - - const file3 = { - path: "/a/d/main.ts", - content: "let x =1;" - }; - - const host = createServerHost([file1, file2, file3, libFile]); - const projectService = createProjectService(host, { useSingleInferredProject: true }); - projectService.openClientFile(file1.path); - projectService.openClientFile(file2.path); - projectService.openClientFile(file3.path); - - checkNumberOfConfiguredProjects(projectService, 0); - checkNumberOfInferredProjects(projectService, 1); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, file2.path, file3.path, libFile.path]); - - - host.reloadFS([file1, configFile, file2, file3, libFile]); - host.checkTimeoutQueueLengthAndRun(2); // load configured project from disk + ensureProjectsForOpenFiles - checkNumberOfConfiguredProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 1); - checkProjectActualFiles(projectService.inferredProjects[0], [file2.path, file3.path, libFile.path]); - }); - - it("should reuse same project if file is opened from the configured project that has no open files", () => { - const file1 = { - path: "/a/b/main.ts", - content: "let x =1;" - }; - const file2 = { - path: "/a/b/main2.ts", - content: "let y =1;" - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6" - }, - "files": [ "main.ts", "main2.ts" ] - }` - }; - const host = createServerHost([file1, file2, configFile, libFile]); - const projectService = createProjectService(host, { useSingleInferredProject: true }); - projectService.openClientFile(file1.path); - checkNumberOfConfiguredProjects(projectService, 1); - const project = projectService.configuredProjects.get(configFile.path)!; - assert.isTrue(project.hasOpenRef()); // file1 - - projectService.closeClientFile(file1.path); - checkNumberOfConfiguredProjects(projectService, 1); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - assert.isFalse(project.hasOpenRef()); // No open files - assert.isFalse(project.isClosed()); - - projectService.openClientFile(file2.path); - checkNumberOfConfiguredProjects(projectService, 1); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - assert.isTrue(project.hasOpenRef()); // file2 - assert.isFalse(project.isClosed()); - }); - - it("should not close configured project after closing last open file, but should be closed on next file open if its not the file from same project", () => { - const file1 = { - path: "/a/b/main.ts", - content: "let x =1;" - }; - const configFile: File = { - path: "/a/b/tsconfig.json", - content: `{ - "compilerOptions": { - "target": "es6" - }, - "files": [ "main.ts" ] - }` - }; - const host = createServerHost([file1, configFile, libFile]); - const projectService = createProjectService(host, { useSingleInferredProject: true }); - projectService.openClientFile(file1.path); - checkNumberOfConfiguredProjects(projectService, 1); - const project = projectService.configuredProjects.get(configFile.path)!; - assert.isTrue(project.hasOpenRef()); // file1 - - projectService.closeClientFile(file1.path); - checkNumberOfConfiguredProjects(projectService, 1); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - assert.isFalse(project.hasOpenRef()); // No files - assert.isFalse(project.isClosed()); - - projectService.openClientFile(libFile.path); - checkNumberOfConfiguredProjects(projectService, 0); - assert.isFalse(project.hasOpenRef()); // No files + project closed - assert.isTrue(project.isClosed()); - }); - - it("should not close external project with no open files", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y =1;" - }; - const externalProjectName = "externalproject"; - const host = createServerHost([file1, file2]); - const projectService = createProjectService(host); - projectService.openExternalProject({ - rootFiles: toExternalFiles([file1.path, file2.path]), - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfExternalProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - - // open client file - should not lead to creation of inferred project - projectService.openClientFile(file1.path, file1.content); - checkNumberOfExternalProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - - // close client file - external project should still exists - projectService.closeClientFile(file1.path); - checkNumberOfExternalProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - - projectService.closeExternalProject(externalProjectName); - checkNumberOfExternalProjects(projectService, 0); - checkNumberOfInferredProjects(projectService, 0); - }); - - it("external project for dynamic file", () => { - const externalProjectName = "^ScriptDocument1 file1.ts"; - const externalFiles = toExternalFiles(["^ScriptDocument1 file1.ts"]); - const host = createServerHost([]); - const projectService = createProjectService(host); - projectService.openExternalProject({ - rootFiles: externalFiles, - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfExternalProjects(projectService, 1); - checkNumberOfInferredProjects(projectService, 0); - - externalFiles[0].content = "let x =1;"; - projectService.applyChangesInOpenFiles(externalFiles, [], []); - }); - - it("external project that included config files", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - const config1 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: {}, - files: ["f1.ts"] - } - ) - }; - const file2 = { - path: "/a/c/f2.ts", - content: "let y =1;" - }; - const config2 = { - path: "/a/c/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: {}, - files: ["f2.ts"] - } - ) - }; - const file3 = { - path: "/a/d/f3.ts", - content: "let z =1;" - }; - const externalProjectName = "externalproject"; - const host = createServerHost([file1, file2, file3, config1, config2]); - const projectService = createProjectService(host); - projectService.openExternalProject({ - rootFiles: toExternalFiles([config1.path, config2.path, file3.path]), - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfProjects(projectService, { configuredProjects: 2 }); - const proj1 = projectService.configuredProjects.get(config1.path); - const proj2 = projectService.configuredProjects.get(config2.path); - assert.isDefined(proj1); - assert.isDefined(proj2); - - // open client file - should not lead to creation of inferred project - projectService.openClientFile(file1.path, file1.content); - checkNumberOfProjects(projectService, { configuredProjects: 2 }); - assert.strictEqual(projectService.configuredProjects.get(config1.path), proj1); - assert.strictEqual(projectService.configuredProjects.get(config2.path), proj2); - - projectService.openClientFile(file3.path, file3.content); - checkNumberOfProjects(projectService, { configuredProjects: 2, inferredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(config1.path), proj1); - assert.strictEqual(projectService.configuredProjects.get(config2.path), proj2); - - projectService.closeExternalProject(externalProjectName); - // open file 'file1' from configured project keeps project alive - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(config1.path), proj1); - assert.isUndefined(projectService.configuredProjects.get(config2.path)); - - projectService.closeClientFile(file3.path); - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(config1.path), proj1); - assert.isUndefined(projectService.configuredProjects.get(config2.path)); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - - projectService.closeClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(config1.path), proj1); - assert.isUndefined(projectService.configuredProjects.get(config2.path)); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - - projectService.openClientFile(file2.path, file2.content); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - assert.isUndefined(projectService.configuredProjects.get(config1.path)); - assert.isDefined(projectService.configuredProjects.get(config2.path)); - }); - - describe("ignoreConfigFiles", () => { - it("external project including config file", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - const config1 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: {}, - files: ["f1.ts"] - } - ) - }; - - const externalProjectName = "externalproject"; - const host = createServerHost([file1, config1]); - const projectService = createProjectService(host, { useSingleInferredProject: true }, { syntaxOnly: true }); - projectService.openExternalProject({ - rootFiles: toExternalFiles([file1.path, config1.path]), - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfProjects(projectService, { externalProjects: 1 }); - const proj = projectService.externalProjects[0]; - assert.isDefined(proj); - - assert.isTrue(proj.fileExists(file1.path)); - }); - - it("loose file included in config file (openClientFile)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - const config1 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: {}, - files: ["f1.ts"] - } - ) - }; - - const host = createServerHost([file1, config1]); - const projectService = createProjectService(host, { useSingleInferredProject: true }, { syntaxOnly: true }); - projectService.openClientFile(file1.path, file1.content); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - const proj = projectService.inferredProjects[0]; - assert.isDefined(proj); - - assert.isTrue(proj.fileExists(file1.path)); - }); - - it("loose file included in config file (applyCodeChanges)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - const config1 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify( - { - compilerOptions: {}, - files: ["f1.ts"] - } - ) - }; - - const host = createServerHost([file1, config1]); - const projectService = createProjectService(host, { useSingleInferredProject: true }, { syntaxOnly: true }); - projectService.applyChangesInOpenFiles([{ fileName: file1.path, content: file1.content }], [], []); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - const proj = projectService.inferredProjects[0]; - assert.isDefined(proj); - - assert.isTrue(proj.fileExists(file1.path)); - }); - }); - - it("disable inferred project", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x =1;" - }; - - const host = createServerHost([file1]); - const projectService = createProjectService(host, { useSingleInferredProject: true }, { syntaxOnly: true }); - - projectService.openClientFile(file1.path, file1.content); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - const proj = projectService.inferredProjects[0]; - assert.isDefined(proj); - - assert.isFalse(proj.languageServiceEnabled); - }); - - it("reload regular file after closing", () => { - const f1 = { - path: "/a/b/app.ts", - content: "x." - }; - const f2 = { - path: "/a/b/lib.ts", - content: "let x: number;" - }; - - const host = createServerHost([f1, f2, libFile]); - const service = createProjectService(host); - service.openExternalProject({ projectFileName: "/a/b/project", rootFiles: toExternalFiles([f1.path, f2.path]), options: {} }); - - service.openClientFile(f1.path); - service.openClientFile(f2.path, "let x: string"); - - service.checkNumberOfProjects({ externalProjects: 1 }); - checkProjectActualFiles(service.externalProjects[0], [f1.path, f2.path, libFile.path]); - - const completions1 = service.externalProjects[0].getLanguageService().getCompletionsAtPosition(f1.path, 2, emptyOptions)!; - // should contain completions for string - assert.isTrue(completions1.entries.some(e => e.name === "charAt"), "should contain 'charAt'"); - assert.isFalse(completions1.entries.some(e => e.name === "toExponential"), "should not contain 'toExponential'"); - - service.closeClientFile(f2.path); - const completions2 = service.externalProjects[0].getLanguageService().getCompletionsAtPosition(f1.path, 2, emptyOptions)!; - // should contain completions for string - assert.isFalse(completions2.entries.some(e => e.name === "charAt"), "should not contain 'charAt'"); - assert.isTrue(completions2.entries.some(e => e.name === "toExponential"), "should contain 'toExponential'"); - }); - - it("clear mixed content file after closing", () => { - const f1 = { - path: "/a/b/app.ts", - content: " " - }; - const f2 = { - path: "/a/b/lib.html", - content: "" - }; - - const host = createServerHost([f1, f2, libFile]); - const service = createProjectService(host); - service.openExternalProject({ projectFileName: "/a/b/project", rootFiles: [{ fileName: f1.path }, { fileName: f2.path, hasMixedContent: true }], options: {} }); - - service.openClientFile(f1.path); - service.openClientFile(f2.path, "let somelongname: string"); - - service.checkNumberOfProjects({ externalProjects: 1 }); - checkProjectActualFiles(service.externalProjects[0], [f1.path, f2.path, libFile.path]); - - const completions1 = service.externalProjects[0].getLanguageService().getCompletionsAtPosition(f1.path, 0, emptyOptions)!; - assert.isTrue(completions1.entries.some(e => e.name === "somelongname"), "should contain 'somelongname'"); - - service.closeClientFile(f2.path); - const completions2 = service.externalProjects[0].getLanguageService().getCompletionsAtPosition(f1.path, 0, emptyOptions)!; - assert.isFalse(completions2.entries.some(e => e.name === "somelongname"), "should not contain 'somelongname'"); - const sf2 = service.externalProjects[0].getLanguageService().getProgram()!.getSourceFile(f2.path)!; - assert.equal(sf2.text, ""); - }); - - - it("external project with included config file opened after configured project", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - const externalProjectName = "externalproject"; - const host = createServerHost([file1, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - projectService.openExternalProject({ - rootFiles: toExternalFiles([configFile.path]), - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - projectService.closeClientFile(file1.path); - // configured project is alive since it is opened as part of external project - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - projectService.closeExternalProject(externalProjectName); - checkNumberOfProjects(projectService, { configuredProjects: 0 }); - }); - - it("external project with included config file opened after configured project and then closed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/f2.ts", - content: "let x = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - const externalProjectName = "externalproject"; - const host = createServerHost([file1, file2, libFile, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - const project = projectService.configuredProjects.get(configFile.path); - - projectService.openExternalProject({ - rootFiles: toExternalFiles([configFile.path]), - options: {}, - projectFileName: externalProjectName - }); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - - projectService.closeExternalProject(externalProjectName); - // configured project is alive since file is still open - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - - projectService.closeClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - assert.strictEqual(projectService.configuredProjects.get(configFile.path), project); - - projectService.openClientFile(file2.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - assert.isUndefined(projectService.configuredProjects.get(configFile.path)); - }); - - it("changes in closed files are reflected in project structure", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: `export let x = 1` - }; - const file3 = { - path: "/a/c/f3.ts", - content: `export let y = 1;` - }; - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - const inferredProject0 = projectService.inferredProjects[0]; - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, file2.path]); - - projectService.openClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProject0); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, file2.path]); - const inferredProject1 = projectService.inferredProjects[1]; - checkProjectActualFiles(projectService.inferredProjects[1], [file3.path]); - - const modifiedFile2 = { - path: file2.path, - content: `export * from "../c/f3"` // now inferred project should inclule file3 - }; - - host.reloadFS([file1, modifiedFile2, file3]); - host.checkTimeoutQueueLengthAndRun(2); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProject0); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, modifiedFile2.path, file3.path]); - assert.strictEqual(projectService.inferredProjects[1], inferredProject1); - assert.isTrue(inferredProject1.isOrphan()); - }); - - it("deleted files affect project structure", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: `export * from "../c/f3"` - }; - const file3 = { - path: "/a/c/f3.ts", - content: `export let y = 1;` - }; - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, file2.path, file3.path]); - - projectService.openClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - - host.reloadFS([file1, file3]); - host.checkTimeoutQueueLengthAndRun(2); - - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file3.path]); - }); - - it("ignores files excluded by a custom safe type list", () => { - const file1 = { - path: "/a/b/f1.js", - content: "export let x = 5" - }; - const office = { - path: "/lib/duckquack-3.min.js", - content: "whoa do @@ not parse me ok thanks!!!" - }; - const host = createServerHost([file1, office, customTypesMap]); - const projectService = createProjectService(host); - try { - projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles([file1.path, office.path]) }); - const proj = projectService.externalProjects[0]; - assert.deepEqual(proj.getFileNames(/*excludeFilesFromExternalLibraries*/ true), [file1.path]); - assert.deepEqual(proj.getTypeAcquisition().include, ["duck-types"]); - } finally { - projectService.resetSafeList(); - } - }); - - it("file with name constructor.js doesnt cause issue with typeAcquisition when safe type list", () => { - const file1 = { - path: "/a/b/f1.js", - content: `export let x = 5; import { s } from "s"` - }; - const constructorFile = { - path: "/a/b/constructor.js", - content: "const x = 10;" - }; - const bliss = { - path: "/a/b/bliss.js", - content: "export function is() { return true; }" - }; - const host = createServerHost([file1, libFile, constructorFile, bliss, customTypesMap]); - let request: string | undefined; - const cachePath = "/a/data"; - const typingsInstaller: server.ITypingsInstaller = { - isKnownTypesPackageName: returnFalse, - installPackage: notImplemented, - inspectValue: notImplemented, - enqueueInstallTypingsRequest: (proj, typeAcquisition, unresolvedImports) => { - assert.isUndefined(request); - request = JSON.stringify(server.createInstallTypingsRequest(proj, typeAcquisition, unresolvedImports || server.emptyArray, cachePath)); - }, - attach: noop, - onProjectClosed: noop, - globalTypingsCacheLocation: cachePath - }; - - const projectName = "project"; - const projectService = createProjectService(host, { typingsInstaller }); - projectService.openExternalProject({ projectFileName: projectName, options: {}, rootFiles: toExternalFiles([file1.path, constructorFile.path, bliss.path]) }); - assert.equal(request, JSON.stringify({ - projectName, - fileNames: [libFile.path, file1.path, constructorFile.path, bliss.path], - compilerOptions: { allowNonTsExtensions: true, noEmitForJsFiles: true }, - typeAcquisition: { include: ["blissfuljs"], exclude: [], enable: true }, - unresolvedImports: ["s"], - projectRootPath: "/", - cachePath, - kind: "discover" - })); - const response = JSON.parse(request!); - request = undefined; - projectService.updateTypingsForProject({ - kind: "action::set", - projectName: response.projectName, - typeAcquisition: response.typeAcquisition, - compilerOptions: response.compilerOptions, - typings: emptyArray, - unresolvedImports: response.unresolvedImports, - }); - - host.checkTimeoutQueueLengthAndRun(2); - assert.isUndefined(request); - }); - - it("ignores files excluded by the default type list", () => { - const file1 = { - path: "/a/b/f1.js", - content: "export let x = 5" - }; - const minFile = { - path: "/c/moment.min.js", - content: "unspecified" - }; - const kendoFile1 = { - path: "/q/lib/kendo/kendo.all.min.js", - content: "unspecified" - }; - const kendoFile2 = { - path: "/q/lib/kendo/kendo.ui.min.js", - content: "unspecified" - }; - const kendoFile3 = { - path: "/q/lib/kendo-ui/kendo.all.js", - content: "unspecified" - }; - const officeFile1 = { - path: "/scripts/Office/1/excel-15.debug.js", - content: "unspecified" - }; - const officeFile2 = { - path: "/scripts/Office/1/powerpoint.js", - content: "unspecified" - }; - const files = [file1, minFile, kendoFile1, kendoFile2, kendoFile3, officeFile1, officeFile2]; - const host = createServerHost(files); - const projectService = createProjectService(host); - try { - projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles(files.map(f => f.path)) }); - const proj = projectService.externalProjects[0]; - assert.deepEqual(proj.getFileNames(/*excludeFilesFromExternalLibraries*/ true), [file1.path]); - assert.deepEqual(proj.getTypeAcquisition().include, ["kendo-ui", "office"]); - } finally { - projectService.resetSafeList(); - } - }); - - it("removes version numbers correctly", () => { - const testData: [string, string][] = [ - ["jquery-max", "jquery-max"], - ["jquery.min", "jquery"], - ["jquery-min.4.2.3", "jquery"], - ["jquery.min.4.2.1", "jquery"], - ["minimum", "minimum"], - ["min", "min"], - ["min.3.2", "min"], - ["jquery", "jquery"] - ]; - for (const t of testData) { - assert.equal(removeMinAndVersionNumbers(t[0]), t[1], t[0]); - } - }); - - it("ignores files excluded by a legacy safe type list", () => { - const file1 = { - path: "/a/b/bliss.js", - content: "let x = 5" - }; - const file2 = { - path: "/a/b/foo.js", - content: "" - }; - const file3 = { - path: "/a/b/Bacon.js", - content: "let y = 5" - }; - const host = createServerHost([file1, file2, file3, customTypesMap]); - const projectService = createProjectService(host); - try { - projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles([file1.path, file2.path]), typeAcquisition: { enable: true } }); - const proj = projectService.externalProjects[0]; - assert.deepEqual(proj.getFileNames(), [file2.path]); - } finally { - projectService.resetSafeList(); - } - }); - - it("open file become a part of configured project if it is referenced from root file", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "export let x = 5" - }; - const file2 = { - path: "/a/c/f2.ts", - content: `import {x} from "../b/f1"` - }; - const file3 = { - path: "/a/c/f3.ts", - content: "export let y = 1" - }; - const configFile = { - path: "/a/c/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f2.ts", "f3.ts"] }) - }; - - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path]); - - projectService.openClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file3.path]); - - host.reloadFS([file1, file2, file3, configFile]); - host.checkTimeoutQueueLengthAndRun(2); // load configured project from disk + ensureProjectsForOpenFiles - checkNumberOfProjects(projectService, { configuredProjects: 1, inferredProjects: 2 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, file3.path, configFile.path]); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - assert.isTrue(projectService.inferredProjects[1].isOrphan()); - }); - - it("correctly migrate files between projects", () => { - const file1 = { - path: "/a/b/f1.ts", - content: ` - export * from "../c/f2"; - export * from "../d/f3";` - }; - const file2 = { - path: "/a/c/f2.ts", - content: "export let x = 1;" - }; - const file3 = { - path: "/a/d/f3.ts", - content: "export let y = 1;" - }; - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openClientFile(file2.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file2.path]); - let inferredProjects = projectService.inferredProjects.slice(); - - projectService.openClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProjects[0]); - checkProjectActualFiles(projectService.inferredProjects[0], [file2.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file3.path]); - inferredProjects = projectService.inferredProjects.slice(); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - assert.notStrictEqual(projectService.inferredProjects[0], inferredProjects[0]); - assert.notStrictEqual(projectService.inferredProjects[0], inferredProjects[1]); - checkProjectRootFiles(projectService.inferredProjects[0], [file1.path]); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path, file2.path, file3.path]); - inferredProjects = projectService.inferredProjects.slice(); - - projectService.closeClientFile(file1.path); - checkNumberOfProjects(projectService, { inferredProjects: 3 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProjects[0]); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - checkProjectActualFiles(projectService.inferredProjects[1], [file2.path]); - checkProjectActualFiles(projectService.inferredProjects[2], [file3.path]); - inferredProjects = projectService.inferredProjects.slice(); - - projectService.closeClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 3 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProjects[0]); - assert.strictEqual(projectService.inferredProjects[1], inferredProjects[1]); - assert.strictEqual(projectService.inferredProjects[2], inferredProjects[2]); - assert.isTrue(projectService.inferredProjects[0].isOrphan()); - checkProjectActualFiles(projectService.inferredProjects[1], [file2.path]); - assert.isTrue(projectService.inferredProjects[2].isOrphan()); - - projectService.openClientFile(file3.path); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - assert.strictEqual(projectService.inferredProjects[0], inferredProjects[2]); - assert.strictEqual(projectService.inferredProjects[1], inferredProjects[1]); - checkProjectActualFiles(projectService.inferredProjects[0], [file3.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file2.path]); - }); - - it("can correctly update configured project when set of root files has changed (new file on disk)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - - const host = createServerHost([file1, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, configFile.path]); - - host.reloadFS([file1, file2, configFile]); - - host.checkTimeoutQueueLengthAndRun(2); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectRootFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path]); - }); - - it("can correctly update configured project when set of root files has changed (new file in list of files)", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts"] }) - }; - - const host = createServerHost([file1, file2, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, configFile.path]); - - const modifiedConfigFile = { - path: configFile.path, - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts", "f2.ts"] }) - }; - - host.reloadFS([file1, file2, modifiedConfigFile]); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - host.checkTimeoutQueueLengthAndRun(2); - checkProjectRootFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path]); - }); - - it("can update configured project when set of root files was not changed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const configFile = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts", "f2.ts"] }) - }; - - const host = createServerHost([file1, file2, configFile]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, configFile.path]); - - const modifiedConfigFile = { - path: configFile.path, - content: JSON.stringify({ compilerOptions: { outFile: "out.js" }, files: ["f1.ts", "f2.ts"] }) - }; - - host.reloadFS([file1, file2, modifiedConfigFile]); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectRootFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path]); - }); - - it("can correctly update external project when set of root files has changed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 1" - }; - const host = createServerHost([file1, file2]); - const projectService = createProjectService(host); - - projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles([file1.path]) }); - checkNumberOfProjects(projectService, { externalProjects: 1 }); - checkProjectActualFiles(projectService.externalProjects[0], [file1.path]); - - projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles([file1.path, file2.path]) }); - checkNumberOfProjects(projectService, { externalProjects: 1 }); - checkProjectRootFiles(projectService.externalProjects[0], [file1.path, file2.path]); - }); - - it("can update external project when set of root files was not changed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `export * from "m"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: "export let y = 1" - }; - const file3 = { - path: "/a/m.ts", - content: "export let y = 1" - }; - - const host = createServerHost([file1, file2, file3]); - const projectService = createProjectService(host); - - projectService.openExternalProject({ projectFileName: "project", options: { moduleResolution: ModuleResolutionKind.NodeJs }, rootFiles: toExternalFiles([file1.path, file2.path]) }); - checkNumberOfProjects(projectService, { externalProjects: 1 }); - checkProjectRootFiles(projectService.externalProjects[0], [file1.path, file2.path]); - checkProjectActualFiles(projectService.externalProjects[0], [file1.path, file2.path]); - - projectService.openExternalProject({ projectFileName: "project", options: { moduleResolution: ModuleResolutionKind.Classic }, rootFiles: toExternalFiles([file1.path, file2.path]) }); - checkNumberOfProjects(projectService, { externalProjects: 1 }); - checkProjectRootFiles(projectService.externalProjects[0], [file1.path, file2.path]); - checkProjectActualFiles(projectService.externalProjects[0], [file1.path, file2.path, file3.path]); - }); - - it("regression test for crash in acquireOrUpdateDocument", () => { - const tsFile = { - fileName: "/a/b/file1.ts", - path: "/a/b/file1.ts", - content: "" - }; - const jsFile = { - path: "/a/b/file1.js", - content: "var x = 10;", - fileName: "/a/b/file1.js", - scriptKind: "JS" as "JS" - }; - - const host = createServerHost([]); - const projectService = createProjectService(host); - projectService.applyChangesInOpenFiles([tsFile], [], []); - const projs = projectService.synchronizeProjectList([]); - projectService.findProject(projs[0].info!.projectName)!.getLanguageService().getNavigationBarItems(tsFile.fileName); - projectService.synchronizeProjectList([projs[0].info!]); - projectService.applyChangesInOpenFiles([jsFile], [], []); - }); - - it("config file is deleted", () => { - const file1 = { - path: "/a/b/f1.ts", - content: "let x = 1;" - }; - const file2 = { - path: "/a/b/f2.ts", - content: "let y = 2;" - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: {} }) - }; - const host = createServerHost([file1, file2, config]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, config.path]); - - projectService.openClientFile(file2.path); - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, config.path]); - - host.reloadFS([file1, file2]); - host.checkTimeoutQueueLengthAndRun(1); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - checkProjectActualFiles(projectService.inferredProjects[0], [file1.path]); - checkProjectActualFiles(projectService.inferredProjects[1], [file2.path]); - }); - - it("loading files with correct priority", () => { - const f1 = { - path: "/a/main.ts", - content: "let x = 1" - }; - const f2 = { - path: "/a/main.js", - content: "var y = 1" - }; - const config = { - path: "/a/tsconfig.json", - content: JSON.stringify({ - compilerOptions: { allowJs: true } - }) - }; - const host = createServerHost([f1, f2, config]); - const projectService = createProjectService(host); - projectService.setHostConfiguration({ - extraFileExtensions: [ - { extension: ".js", isMixedContent: false }, - { extension: ".html", isMixedContent: true } - ] - }); - projectService.openClientFile(f1.path); - projectService.checkNumberOfProjects({ configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [f1.path, config.path]); - - // Should close configured project with next file open - projectService.closeClientFile(f1.path); - - projectService.openClientFile(f2.path); - projectService.checkNumberOfProjects({ inferredProjects: 1 }); - assert.isUndefined(projectService.configuredProjects.get(config.path)); - checkProjectActualFiles(projectService.inferredProjects[0], [f2.path]); - }); - - it("tsconfig script block support", () => { - const file1 = { - path: "/a/b/f1.ts", - content: ` ` - }; - const file2 = { - path: "/a/b/f2.html", - content: `var hello = "hello";` - }; - const config = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { allowJs: true } }) - }; - const host = createServerHost([file1, file2, config]); - const session = createSession(host); - openFilesForSession([file1], session); - const projectService = session.getProjectService(); - - // HTML file will not be included in any projects yet - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - const configuredProj = configuredProjectAt(projectService, 0); - checkProjectActualFiles(configuredProj, [file1.path, config.path]); - - // Specify .html extension as mixed content - const extraFileExtensions = [{ extension: ".html", scriptKind: ScriptKind.JS, isMixedContent: true }]; - const configureHostRequest = makeSessionRequest(CommandNames.Configure, { extraFileExtensions }); - session.executeCommand(configureHostRequest); - - // The configured project should now be updated to include html file - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - assert.strictEqual(configuredProjectAt(projectService, 0), configuredProj, "Same configured project should be updated"); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, config.path]); - - // Open HTML file - projectService.applyChangesInOpenFiles( - /*openFiles*/[{ fileName: file2.path, hasMixedContent: true, scriptKind: ScriptKind.JS, content: `var hello = "hello";` }], - /*changedFiles*/ undefined, - /*closedFiles*/ undefined); - - // Now HTML file is included in the project - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, config.path]); - - // Check identifiers defined in HTML content are available in .ts file - const project = configuredProjectAt(projectService, 0); - let completions = project.getLanguageService().getCompletionsAtPosition(file1.path, 1, emptyOptions); - assert(completions && completions.entries[0].name === "hello", `expected entry hello to be in completion list`); - - // Close HTML file - projectService.applyChangesInOpenFiles( - /*openFiles*/ undefined, - /*changedFiles*/ undefined, - /*closedFiles*/[file2.path]); - - // HTML file is still included in project - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - checkProjectActualFiles(configuredProjectAt(projectService, 0), [file1.path, file2.path, config.path]); - - // Check identifiers defined in HTML content are not available in .ts file - completions = project.getLanguageService().getCompletionsAtPosition(file1.path, 5, emptyOptions); - assert(completions && completions.entries[0].name !== "hello", `unexpected hello entry in completion list`); - }); - - it("no tsconfig script block diagnostic errors", () => { - - // #1. Ensure no diagnostic errors when allowJs is true - const file1 = { - path: "/a/b/f1.ts", - content: ` ` - }; - const file2 = { - path: "/a/b/f2.html", - content: `var hello = "hello";` - }; - const config1 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { allowJs: true } }) - }; - - let host = createServerHost([file1, file2, config1, libFile], { executingFilePath: combinePaths(getDirectoryPath(libFile.path), "tsc.js") }); - let session = createSession(host); - - // Specify .html extension as mixed content in a configure host request - const extraFileExtensions = [{ extension: ".html", scriptKind: ScriptKind.JS, isMixedContent: true }]; - const configureHostRequest = makeSessionRequest(CommandNames.Configure, { extraFileExtensions }); - session.executeCommand(configureHostRequest); - - openFilesForSession([file1], session); - let projectService = session.getProjectService(); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - let diagnostics = configuredProjectAt(projectService, 0).getLanguageService().getCompilerOptionsDiagnostics(); - assert.deepEqual(diagnostics, []); - - // #2. Ensure no errors when allowJs is false - const config2 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { allowJs: false } }) - }; - - host = createServerHost([file1, file2, config2, libFile], { executingFilePath: combinePaths(getDirectoryPath(libFile.path), "tsc.js") }); - session = createSession(host); - - session.executeCommand(configureHostRequest); - - openFilesForSession([file1], session); - projectService = session.getProjectService(); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - diagnostics = configuredProjectAt(projectService, 0).getLanguageService().getCompilerOptionsDiagnostics(); - assert.deepEqual(diagnostics, []); - - // #3. Ensure no errors when compiler options aren't specified - const config3 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({}) - }; - - host = createServerHost([file1, file2, config3, libFile], { executingFilePath: combinePaths(getDirectoryPath(libFile.path), "tsc.js") }); - session = createSession(host); - - session.executeCommand(configureHostRequest); - - openFilesForSession([file1], session); - projectService = session.getProjectService(); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - diagnostics = configuredProjectAt(projectService, 0).getLanguageService().getCompilerOptionsDiagnostics(); - assert.deepEqual(diagnostics, []); - - // #4. Ensure no errors when files are explicitly specified in tsconfig - const config4 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { allowJs: true }, files: [file1.path, file2.path] }) - }; - - host = createServerHost([file1, file2, config4, libFile], { executingFilePath: combinePaths(getDirectoryPath(libFile.path), "tsc.js") }); - session = createSession(host); - - session.executeCommand(configureHostRequest); - - openFilesForSession([file1], session); - projectService = session.getProjectService(); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - diagnostics = configuredProjectAt(projectService, 0).getLanguageService().getCompilerOptionsDiagnostics(); - assert.deepEqual(diagnostics, []); - - // #4. Ensure no errors when files are explicitly excluded in tsconfig - const config5 = { - path: "/a/b/tsconfig.json", - content: JSON.stringify({ compilerOptions: { allowJs: true }, exclude: [file2.path] }) - }; - - host = createServerHost([file1, file2, config5, libFile], { executingFilePath: combinePaths(getDirectoryPath(libFile.path), "tsc.js") }); - session = createSession(host); - - session.executeCommand(configureHostRequest); - - openFilesForSession([file1], session); - projectService = session.getProjectService(); - - checkNumberOfProjects(projectService, { configuredProjects: 1 }); - - diagnostics = configuredProjectAt(projectService, 0).getLanguageService().getCompilerOptionsDiagnostics(); - assert.deepEqual(diagnostics, []); - }); - - it("project structure update is deferred if files are not added\removed", () => { - const file1 = { - path: "/a/b/f1.ts", - content: `import {x} from "./f2"` - }; - const file2 = { - path: "/a/b/f2.ts", - content: "export let x = 1" - }; - const host = createServerHost([file1, file2]); - const projectService = createProjectService(host); - - projectService.openClientFile(file1.path); - projectService.openClientFile(file2.path); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - projectService.applyChangesInOpenFiles( - /*openFiles*/ undefined, - /*changedFiles*/[{ fileName: file1.path, changes: [{ span: createTextSpan(0, file1.path.length), newText: "let y = 1" }] }], - /*closedFiles*/ undefined); - - checkNumberOfProjects(projectService, { inferredProjects: 1 }); - projectService.ensureInferredProjectsUpToDate_TestOnly(); - checkNumberOfProjects(projectService, { inferredProjects: 2 }); - }); - - it("files with mixed content are handled correctly", () => { - const file1 = { - path: "/a/b/f1.html", - content: `