From d5a6c8edc63241cdc5084ee6d1d1de4cdc30762b Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 6 Jun 2023 17:22:33 -0700 Subject: [PATCH] Test harness fixes (#54556) --- src/harness/harnessIO.ts | 40 +++++++------ src/testRunner/compilerRunner.ts | 39 ++++++------ .../reference/amdLikeInputDeclarationEmit.js | 2 +- .../reference/bundledDtsLateExportRenaming.js | 4 +- ...sextensions=false,noemit=false).errors.txt | 8 +-- ...tsextensions=true,noemit=false).errors.txt | 8 +-- ...onSourceDirectoryDoesNotContainAllFiles.js | 4 +- ...rationFileOverwriteErrorWithOut.errors.txt | 8 +-- ...clarationFileOverwriteErrorWithOut.symbols | 4 +- ...declarationFileOverwriteErrorWithOut.types | 4 +- ...eclarationFilesGeneratingTypeReferences.js | 4 +- .../reference/declarationMapsOutFile.js.map | 4 +- .../declarationMapsOutFile.sourcemap.txt | 10 ++-- .../reference/declarationMapsOutFile2.js.map | 4 +- .../declarationMapsOutFile2.sourcemap.txt | 10 ++-- .../declarationMapsWithSourceMap.js.map | 8 +-- ...declarationMapsWithSourceMap.sourcemap.txt | 20 +++---- .../jsDeclarationsJSDocRedirectedLookups.js | 12 ++-- ...sDeclarationsNonIdentifierInferredNames.js | 4 +- .../jsDeclarationsReactComponents.js | 6 +- ...ompilationWithMapFileAsJsWithOutDir.js.map | 2 +- ...ionWithMapFileAsJsWithOutDir.sourcemap.txt | 6 +- ...rationFileNameSameAsInputJsFile.errors.txt | 4 -- ...OutDeclarationFileNameSameAsInputJsFile.js | 5 ++ ...ithOutFileNameSameAsInputJsFile.errors.txt | 8 +-- ...onWithOutFileNameSameAsInputJsFile.symbols | 4 +- ...tionWithOutFileNameSameAsInputJsFile.types | 4 +- .../reference/library-reference-1.trace.json | 56 ++++++++++-------- .../reference/library-reference-10.trace.json | 59 ++++++++++--------- .../reference/library-reference-15.trace.json | 48 +++++++-------- .../reference/library-reference-5.trace.json | 24 ++++---- ...brary-reference-scoped-packages.trace.json | 6 +- ...sAllowJsImportAssignment(module=node16).js | 6 +- ...llowJsImportAssignment(module=nodenext).js | 6 +- ...ImportHelpersCollisions2(module=node16).js | 2 +- ...portHelpersCollisions2(module=nodenext).js | 2 +- tests/baselines/reference/out-flag2.js.map | 4 +- .../reference/out-flag2.sourcemap.txt | 10 ++-- tests/baselines/reference/out-flag3.js.map | 4 +- .../reference/out-flag3.sourcemap.txt | 10 ++-- .../reference/outModuleConcatAmd.js.map | 4 +- .../outModuleConcatAmd.sourcemap.txt | 10 ++-- .../reference/outModuleConcatSystem.js.map | 4 +- .../outModuleConcatSystem.sourcemap.txt | 10 ++-- .../reference/outModuleTripleSlashRefs.js | 2 +- .../reference/outModuleTripleSlashRefs.js.map | 4 +- .../outModuleTripleSlashRefs.sourcemap.txt | 14 ++--- .../baselines/reference/requireOfJsonFile.js | 4 +- .../reference/requireOfJsonFileNonRelative.js | 2 +- ...reOfJsonFileNonRelativeWithoutExtension.js | 2 +- ...NonRelativeWithoutExtensionResolvesToTs.js | 4 +- .../reference/requireOfJsonFileTypes.js | 16 ++--- .../reference/requireOfJsonFileWithAmd.js | 4 +- .../requireOfJsonFileWithDeclaration.js | 6 +- .../requireOfJsonFileWithEmptyObject.js | 4 +- ...uireOfJsonFileWithEmptyObjectWithErrors.js | 4 +- .../reference/requireOfJsonFileWithErrors.js | 4 +- .../requireOfJsonFileWithModuleEmitNone.js | 4 +- ...equireOfJsonFileWithModuleEmitUndefined.js | 4 +- ...JsonFileWithModuleNodeResolutionEmitAmd.js | 4 +- ...eWithModuleNodeResolutionEmitAmdOutFile.js | 2 +- ...nFileWithModuleNodeResolutionEmitEs2015.js | 4 +- ...nFileWithModuleNodeResolutionEmitEsNext.js | 4 +- ...sonFileWithModuleNodeResolutionEmitNone.js | 4 +- ...nFileWithModuleNodeResolutionEmitSystem.js | 4 +- ...JsonFileWithModuleNodeResolutionEmitUmd.js | 4 +- ...leWithModuleNodeResolutionEmitUndefined.js | 4 +- .../requireOfJsonFileWithNoContent.js | 4 +- .../requireOfJsonFileWithSourceMap.js | 4 +- .../requireOfJsonFileWithSourceMap.js.map | 4 +- ...quireOfJsonFileWithSourceMap.sourcemap.txt | 6 +- .../requireOfJsonFileWithTraillingComma.js | 4 +- .../requireOfJsonFileWithoutAllowJs.js | 4 +- ...requireOfJsonFileWithoutEsModuleInterop.js | 4 +- .../requireOfJsonFileWithoutExtension.js | 4 +- ...eOfJsonFileWithoutExtensionResolvesToTs.js | 6 +- ...quireOfJsonFileWithoutResolveJsonModule.js | 2 +- ...sourceMapWithCaseSensitiveFileNames.js.map | 2 +- ...apWithCaseSensitiveFileNames.sourcemap.txt | 10 ++-- ...rceMapWithNonCaseSensitiveFileNames.js.map | 3 +- ...ithNonCaseSensitiveFileNames.sourcemap.txt | 10 ++-- ...larationEmitBundleWithAmbientReferences.ts | 2 +- .../declarationEmitPathMappingMonorepo.ts | 4 +- ...ationEmitPrefersPathKindBasedOnBundling.ts | 4 +- ...tionEmitPrefersPathKindBasedOnBundling2.ts | 4 +- ...clarationEmitReexportedSymlinkReference.ts | 4 +- ...larationEmitReexportedSymlinkReference2.ts | 4 +- ...larationEmitReexportedSymlinkReference3.ts | 4 +- .../declarationFileOverwriteErrorWithOut.ts | 6 +- ...ilesEmittingIntoSameOutputWithOutOption.ts | 2 +- ...DeclarationEmitExportedClassWithExtends.ts | 2 +- ...OutDeclarationFileNameSameAsInputJsFile.ts | 2 +- ...ilationWithOutFileNameSameAsInputJsFile.ts | 6 +- .../nodeNextPackageImportMapRootDir.ts | 2 +- ...odeNextPackageSelfNameWithOutDirRootDir.ts | 2 +- .../sourceMapWithCaseSensitiveFileNames.ts | 2 +- ...eMapWithCaseSensitiveFileNamesAndOutDir.ts | 2 +- .../sourceMapWithNonCaseSensitiveFileNames.ts | 2 +- ...pWithNonCaseSensitiveFileNamesAndOutDir.ts | 2 +- .../symbolLinkDeclarationEmitModuleNames.ts | 2 +- ...LinkDeclarationEmitModuleNamesImportRef.ts | 4 +- .../outFilerootDirModuleNamesAmd.ts | 2 +- .../outFilerootDirModuleNamesSystem.ts | 2 +- .../references/library-reference-1.ts | 3 +- .../references/library-reference-10.ts | 3 +- .../references/library-reference-15.ts | 3 +- 106 files changed, 380 insertions(+), 371 deletions(-) diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index e1a4d5bb71b..dd23a172032 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -403,6 +403,7 @@ export namespace Compiler { compilerOptions: ts.CompilerOptions | undefined, // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file currentDirectory: string | undefined, + rootDir?: string, symlinks?: vfs.FileSet ): compiler.CompilationResult { const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? ts.cloneCompilerOptions(compilerOptions) : { noResolve: false }; @@ -424,12 +425,12 @@ export namespace Compiler { typeScriptVersion = harnessSettings.typeScriptVersion; } } - if (options.rootDirs) { - options.rootDirs = ts.map(options.rootDirs, d => ts.getNormalizedAbsolutePath(d, currentDirectory)); - } const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : true; - const programFileNames = inputFiles.map(file => file.unitName).filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); + // When a tsconfig is present, root names passed to createProgram should already be absolute + const programFileNames = inputFiles + .map(file => options.configFile ? ts.getNormalizedAbsolutePath(file.unitName, currentDirectory) : file.unitName) + .filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. // Treat them as library files, so include them in build, but not in baselines. @@ -449,6 +450,8 @@ export namespace Compiler { if (symlinks) { fs.apply(symlinks); } + + ts.assign(options, ts.convertToOptionsWithAbsolutePaths(options, path => ts.getNormalizedAbsolutePath(ts.getNormalizedAbsolutePath(path, rootDir), currentDirectory))); const host = new fakes.CompilerHost(fs, options); const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion); result.symlinks = symlinks; @@ -499,7 +502,10 @@ export namespace Compiler { else if (vpath.isTypeScript(file.unitName) || (vpath.isJavaScript(file.unitName) && ts.getAllowJSCompilerOption(options))) { const declFile = findResultCodeFile(file.unitName); if (declFile && !findUnit(declFile.file, declInputFiles) && !findUnit(declFile.file, declOtherFiles)) { - dtsFiles.push({ unitName: declFile.file, content: Utils.removeByteOrderMark(declFile.text) }); + dtsFiles.push({ + unitName: declFile.file, + content: Utils.removeByteOrderMark(declFile.text) + }); } } } @@ -539,7 +545,7 @@ export namespace Compiler { return; } const { declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory } = context; - const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory, symlinks); + const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory, /*rootDir*/ undefined, symlinks); return { declInputFiles, declOtherFiles, declResult: output }; } @@ -1172,13 +1178,13 @@ export namespace TestCaseParser { const optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines const linkRegex = /^[\/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines - export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined) { + export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined, absoluteRootDir?: string) { const linkMetaData = linkRegex.exec(line); linkRegex.lastIndex = 0; if (!linkMetaData) return undefined; if (!symlinks) symlinks = {}; - symlinks[linkMetaData[2].trim()] = new vfs.Symlink(linkMetaData[1].trim()); + symlinks[ts.getNormalizedAbsolutePath(linkMetaData[2].trim(), absoluteRootDir)] = new vfs.Symlink(ts.getNormalizedAbsolutePath(linkMetaData[1].trim(), absoluteRootDir)); return symlinks; } @@ -1202,7 +1208,7 @@ export namespace TestCaseParser { } /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ - export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings = extractCompilerSettings(code)): TestCaseContent { + export function makeUnitsFromTest(code: string, fileName: string, rootDir: string, settings = extractCompilerSettings(code)): TestCaseContent { // List of all the subfiles we've parsed out const testUnitData: TestUnitData[] = []; @@ -1217,7 +1223,7 @@ export namespace TestCaseParser { for (const line of lines) { let testMetaData: RegExpExecArray | null; - const possiblySymlinks = parseSymlinkFromTest(line, symlinks); + const possiblySymlinks = parseSymlinkFromTest(line, symlinks, ts.getNormalizedAbsolutePath(rootDir, vfs.srcFolder)); if (possiblySymlinks) { symlinks = possiblySymlinks; } @@ -1288,9 +1294,9 @@ export namespace TestCaseParser { const files: string[] = []; const directories = new Set(); for (const unit of testUnitData) { - const unitName = ts.getNormalizedAbsolutePath(unit.name, rootDir); - if (unitName.toLowerCase().startsWith(dir.toLowerCase())) { - let path = unitName.substring(dir.length); + const fileName = ts.getNormalizedAbsolutePath(ts.getNormalizedAbsolutePath(unit.name, rootDir), vfs.srcFolder); + if (fileName.toLowerCase().startsWith(dir.toLowerCase())) { + let path = fileName.substring(dir.length); if (path.startsWith("/")) { path = path.substring(1); } @@ -1319,11 +1325,9 @@ export namespace TestCaseParser { if (getConfigNameFromFileName(data.name)) { const configJson = ts.parseJsonText(data.name, data.content); assert.isTrue(configJson.endOfFileToken !== undefined); - let baseDir = ts.normalizePath(ts.getDirectoryPath(data.name)); - if (rootDir) { - baseDir = ts.getNormalizedAbsolutePath(baseDir, rootDir); - } - tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir, /*existingOptions*/ undefined, ts.getNormalizedAbsolutePath(data.name, rootDir)); + const configFileName = ts.getNormalizedAbsolutePath(ts.getNormalizedAbsolutePath(data.name, rootDir), vfs.srcFolder); + const configDir = ts.getDirectoryPath(configFileName); + tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, configDir, /*existingOptions*/ undefined, configFileName); tsConfigFileUnitData = data; // delete entry from the list diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 27256e99e3d..11ba8d19f97 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -92,9 +92,9 @@ export class CompilerBaselineRunner extends RunnerBase { let compilerTest!: CompilerTest; before(() => { let payload; - let rootDir = ts.combinePaths(vfs.srcFolder, fileName.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(fileName) + "/"); + let rootDir = fileName.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(fileName) + "/"; if (test && test.content) { - rootDir = ts.combinePaths(vfs.srcFolder, test.file.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(test.file) + "/"); + rootDir = test.file.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(test.file) + "/"; payload = TestCaseParser.makeUnitsFromTest(test.content, test.file, rootDir); } compilerTest = new CompilerTest(fileName, rootDir, payload, configuration); @@ -179,7 +179,8 @@ class CompilerTest { // equivalent to other files on the file system not directly passed to the compiler (ie things that are referenced by other files) private otherFiles: Compiler.TestFile[]; - constructor(fileName: string, rootDir: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { + constructor(fileName: string, private rootDir: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { + const absoluteRootDir = ts.getNormalizedAbsolutePath(rootDir, vfs.srcFolder); this.fileName = fileName; this.justName = vpath.basename(fileName); this.configuredName = this.justName; @@ -218,20 +219,20 @@ class CompilerTest { this.tsConfigFiles = []; if (testCaseContent.tsConfig) { tsConfigOptions = ts.cloneCompilerOptions(testCaseContent.tsConfig.options); - this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!, rootDir, tsConfigOptions.configFilePath)); + this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!)); for (const unit of units) { - if (testCaseContent.tsConfig.fileNames.includes(ts.getNormalizedAbsolutePath(unit.name, rootDir))) { - this.toBeCompiled.push(this.createHarnessTestFile(unit, rootDir)); + if (testCaseContent.tsConfig.fileNames.includes(ts.getNormalizedAbsolutePath(unit.name, absoluteRootDir))) { + this.toBeCompiled.push(this.createHarnessTestFile(unit)); } else { - this.otherFiles.push(this.createHarnessTestFile(unit, rootDir)); + this.otherFiles.push(this.createHarnessTestFile(unit)); } } } else { const baseUrl = this.harnessSettings.baseUrl; if (baseUrl !== undefined && !ts.isRootedDiskPath(baseUrl)) { - this.harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, rootDir); + this.harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, absoluteRootDir); } const lastUnit = units[units.length - 1]; @@ -240,22 +241,21 @@ class CompilerTest { // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. if (testCaseContent.settings.noImplicitReferences || /require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) { - this.toBeCompiled.push(this.createHarnessTestFile(lastUnit, rootDir)); + this.toBeCompiled.push(this.createHarnessTestFile(lastUnit)); units.forEach(unit => { if (unit.name !== lastUnit.name) { - this.otherFiles.push(this.createHarnessTestFile(unit, rootDir)); + this.otherFiles.push(this.createHarnessTestFile(unit)); } }); } else { this.toBeCompiled = units.map(unit => { - return this.createHarnessTestFile(unit, rootDir); + return this.createHarnessTestFile(unit); }); } } if (tsConfigOptions && tsConfigOptions.configFilePath !== undefined) { - tsConfigOptions.configFilePath = ts.combinePaths(rootDir, tsConfigOptions.configFilePath); tsConfigOptions.configFile!.fileName = tsConfigOptions.configFilePath; } @@ -265,6 +265,7 @@ class CompilerTest { this.harnessSettings, /*options*/ tsConfigOptions, /*currentDirectory*/ this.harnessSettings.currentDirectory, + this.rootDir, testCaseContent.symlinks ); @@ -352,13 +353,11 @@ class CompilerTest { ); } - private makeUnitName(name: string, root: string) { - const path = ts.toPath(name, root, ts.identity); - const pathStart = ts.toPath(IO.getCurrentDirectory(), "", ts.identity); - return pathStart ? path.replace(pathStart, "/") : path; - } - - private createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData, rootDir: string, unitName?: string): Compiler.TestFile { - return { unitName: unitName || this.makeUnitName(lastUnit.name, rootDir), content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + private createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { + return { + unitName: ts.getNormalizedAbsolutePath(unit.name, this.rootDir), + content: unit.content, + fileOptions: unit.fileOptions + }; } } diff --git a/tests/baselines/reference/amdLikeInputDeclarationEmit.js b/tests/baselines/reference/amdLikeInputDeclarationEmit.js index a34697f4f3e..584a304216a 100644 --- a/tests/baselines/reference/amdLikeInputDeclarationEmit.js +++ b/tests/baselines/reference/amdLikeInputDeclarationEmit.js @@ -33,7 +33,7 @@ define("lib/ExtendedClass", ["deps/BaseClass"], //// [ExtendedClass.d.ts] -/// +/// export = ExtendedClass; declare const ExtendedClass: new () => { f: () => "something"; diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.js b/tests/baselines/reference/bundledDtsLateExportRenaming.js index c2a8d6867a2..ab2b3cc7aa1 100644 --- a/tests/baselines/reference/bundledDtsLateExportRenaming.js +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.js @@ -54,10 +54,10 @@ declare module "index" { //// [DtsFileErrors] -dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations. +tests/cases/compiler/dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations. -==== ./dist/out.d.ts (1 errors) ==== +==== tests/cases/compiler/dist/out.d.ts (1 errors) ==== declare module "nested/shared" { export class B { } diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt index b554754ebab..e2b878a28c6 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).errors.txt @@ -1,5 +1,5 @@ -error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. -error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/b.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/c.js' because it would be overwritten by multiple input files. error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. The file is in the program because: Root file specified for compilation @@ -13,8 +13,8 @@ error TS6054: File '/project/e.txt' has an unsupported extension. The only suppo /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? -!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/b.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/c.js' because it would be overwritten by multiple input files. !!! error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. !!! error TS6054: The file is in the program because: !!! error TS6054: Root file specified for compilation diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt index feed6ec3922..02664a5112e 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).errors.txt @@ -1,5 +1,5 @@ -error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. -error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/b.js' because it would be overwritten by multiple input files. +error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/c.js' because it would be overwritten by multiple input files. error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. The file is in the program because: @@ -9,8 +9,8 @@ error TS6054: File '/project/e.txt' has an unsupported extension. The only suppo /project/types.d.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.ts' instead? -!!! error TS5056: Cannot write file 'out/b.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'out/c.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/b.js' because it would be overwritten by multiple input files. +!!! error TS5056: Cannot write file 'tests/cases/conformance/moduleResolution/bundler/out/c.js' because it would be overwritten by multiple input files. !!! error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. !!! error TS6054: File '/project/e.txt' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. !!! error TS6054: The file is in the program because: diff --git a/tests/baselines/reference/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.js b/tests/baselines/reference/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.js index cf0c04350a8..5a736583a62 100644 --- a/tests/baselines/reference/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.js +++ b/tests/baselines/reference/declarationEmitCommonSourceDirectoryDoesNotContainAllFiles.js @@ -28,10 +28,10 @@ declare module "index" { //// [DtsFileErrors] -dist/index.d.ts(2,23): error TS2307: Cannot find module 'b' or its corresponding type declarations. +/a/tests/cases/compiler/dist/index.d.ts(2,23): error TS2307: Cannot find module 'b' or its corresponding type declarations. -==== dist/index.d.ts (1 errors) ==== +==== /a/tests/cases/compiler/dist/index.d.ts (1 errors) ==== declare module "src/index" { import { B } from "b"; ~~~ diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt index e065bfe5aa1..8fd3b9e460d 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -1,18 +1,18 @@ -error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file. +error TS5055: Cannot write file '/out.d.ts' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'outFile' instead. -!!! error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file. +!!! error TS5055: Cannot write file '/out.d.ts' because it would overwrite input file. !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/compiler/out.d.ts (0 errors) ==== +==== /out.d.ts (0 errors) ==== declare class c { } -==== tests/cases/compiler/a.ts (0 errors) ==== +==== /a.ts (0 errors) ==== class d { } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols index 31607388f7b..94df6948296 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols @@ -1,9 +1,9 @@ -=== tests/cases/compiler/out.d.ts === +=== /out.d.ts === declare class c { >c : Symbol(c, Decl(out.d.ts, 0, 0)) } -=== tests/cases/compiler/a.ts === +=== /a.ts === class d { >d : Symbol(d, Decl(a.ts, 0, 0)) } diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types index 431781bbca4..76ed6a6f027 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types @@ -1,9 +1,9 @@ -=== tests/cases/compiler/out.d.ts === +=== /out.d.ts === declare class c { >c : c } -=== tests/cases/compiler/a.ts === +=== /a.ts === class d { >d : d } diff --git a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js index bbcd9f7f69b..e310d5be711 100644 --- a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js +++ b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js @@ -29,7 +29,7 @@ declare namespace Test { //// [DtsFileErrors] -out.d.ts(1,23): error TS2688: Cannot find type definition file for 'jquery'. +tests/cases/compiler/out.d.ts(1,23): error TS2688: Cannot find type definition file for 'jquery'. ==== /a/node_modules/@types/jquery/index.d.ts (0 errors) ==== @@ -37,7 +37,7 @@ out.d.ts(1,23): error TS2688: Cannot find type definition file for 'jquery'. } -==== out.d.ts (1 errors) ==== +==== tests/cases/compiler/out.d.ts (1 errors) ==== /// ~~~~~~ !!! error TS2688: Cannot find type definition file for 'jquery'. diff --git a/tests/baselines/reference/declarationMapsOutFile.js.map b/tests/baselines/reference/declarationMapsOutFile.js.map index 31ad85d6650..efa89ba1383 100644 --- a/tests/baselines/reference/declarationMapsOutFile.js.map +++ b/tests/baselines/reference/declarationMapsOutFile.js.map @@ -1,3 +1,3 @@ //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQogICAgICAgICAgICBiOiBudW1iZXI7DQogICAgICAgIH07DQogICAgICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCiAgICB9DQp9DQpkZWNsYXJlIG1vZHVsZSAiaW5kZXgiIHsNCiAgICBpbXBvcnQgeyBGb28gfSBmcm9tICJhIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLFVBQVk7SUFFeEIsTUFBTSxDQUFDLEtBQVksQ0FBQztJQUdwQixNQUFNLENBQUMsSUFBSSxDQUFDOztLQUFxQixDQUFDO0lBQ2xDLE9BQU8sRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQog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bGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= diff --git a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt index 26c730e30c4..c5e85622abd 100644 --- a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: bundle.d.ts mapUrl: bundle.d.ts.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts +sources: a.ts,index.ts =================================================================== ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:a.ts ------------------------------------------------------------------- >>>declare module "a" { >>> export class Foo { @@ -91,8 +91,8 @@ sourceFile:tests/cases/compiler/a.ts 1 >Emitted(9, 6) Source(8, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/index.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:index.ts ------------------------------------------------------------------- >>>} >>>declare module "index" { diff --git a/tests/baselines/reference/declarationMapsOutFile2.js.map b/tests/baselines/reference/declarationMapsOutFile2.js.map index 873bdf19820..9fbc681df5c 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.js.map +++ b/tests/baselines/reference/declarationMapsOutFile2.js.map @@ -1,3 +1,3 @@ //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== diff --git a/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt b/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt index 20120d0568e..00afbcdac1c 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsOutFile2.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: bundle.d.ts mapUrl: bundle.d.ts.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts +sources: a.ts,index.ts =================================================================== ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:a.ts ------------------------------------------------------------------- >>>declare class Foo { 1 > @@ -87,8 +87,8 @@ sourceFile:tests/cases/compiler/a.ts 1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/index.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:index.ts ------------------------------------------------------------------- >>>declare const c: Foo; 1-> diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.js.map b/tests/baselines/reference/declarationMapsWithSourceMap.js.map index f0aeaaf4976..c0ab9274002 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.js.map +++ b/tests/baselines/reference/declarationMapsWithSourceMap.js.map @@ -1,7 +1,7 @@ //// [bundle.js.map] -{"version":3,"file":"bundle.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":"AAAA;IAAA;IAOA,CAAC;IANG,qBAAO,GAAP,UAAQ,CAAc;QAClB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IACpB,CAAC;IACM,QAAI,GAAX;QACI,OAAO,IAAI,GAAG,EAAE,CAAC;IACrB,CAAC;IACL,UAAC;AAAD,CAAC,AAPD,IAOC;ACPD,IAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OA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xDQUFDLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQztBQUNwQixDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBQyxDQUFDLENBQUM7QUFFbkIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQyxDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.js","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA;IAAA;IAOA,CAAC;IANG,qBAAO,GAAP,UAAQ,CAAc;QAClB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IACpB,CAAC;IACM,QAAI,GAAX;QACI,OAAO,IAAI,GAAG,EAAE,CAAC;IACrB,CAAC;IACL,UAAC;AAAD,CAAC,AAPD,IAOC;ACPD,IAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEZvbyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsNCiAgICBmdW5jdGlvbiBGb28oKSB7DQogICAgfQ0KICAgIEZvby5wcm90b3R5cGUu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AgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjbGFzcyBGb28gew0KICAgIGRvVGhpbmcoeDogew0KICAgICAgICBhOiBudW1iZXI7DQogICAgfSk6IHsNCiAgICAgICAgYjogbnVtYmVyOw0KICAgIH07DQogICAgc3RhdGljIG1ha2UoKTogRm9vOw0KfQ0KZGVjbGFyZSBjb25zdCBjOiBGb287DQpkZWNsYXJlIGxldCB4OiB7DQogICAgYjogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWJ1bmRsZS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhLnRzIiwiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBTSxHQUFHO0lBQ0wsT0FBTyxDQUFDLEdBQUc7UUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO0tBQUM7OztJQUd0QixNQUFNLENBQUMsSUFBSTtDQUdkO0FDUEQsUUFBQSxNQUFNLENBQUMsS0FBWSxDQUFDO0FBR3BCLFFBQUEsSUFBSSxDQUFDOztDQUFxQixDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt index 4f343b2142e..d97ef4c5890 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: bundle.js mapUrl: bundle.js.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts +sources: a.ts,index.ts =================================================================== ------------------------------------------------------------------- -emittedFile:bundle.js -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/bundle.js +sourceFile:a.ts ------------------------------------------------------------------- >>>var Foo = /** @class */ (function () { 1 > @@ -172,8 +172,8 @@ sourceFile:tests/cases/compiler/a.ts 4 >Emitted(11, 6) Source(8, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:bundle.js -sourceFile:tests/cases/compiler/index.ts +emittedFile:tests/cases/compiler/bundle.js +sourceFile:index.ts ------------------------------------------------------------------- >>>var c = new Foo(); 1-> @@ -296,11 +296,11 @@ sourceFile:tests/cases/compiler/index.ts JsFile: bundle.d.ts mapUrl: bundle.d.ts.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts +sources: a.ts,index.ts =================================================================== ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:a.ts ------------------------------------------------------------------- >>>declare class Foo { 1 > @@ -381,8 +381,8 @@ sourceFile:tests/cases/compiler/a.ts 1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:bundle.d.ts -sourceFile:tests/cases/compiler/index.ts +emittedFile:tests/cases/compiler/bundle.d.ts +sourceFile:index.ts ------------------------------------------------------------------- >>>declare const c: Foo; 1-> diff --git a/tests/baselines/reference/jsDeclarationsJSDocRedirectedLookups.js b/tests/baselines/reference/jsDeclarationsJSDocRedirectedLookups.js index 019dd3663ed..f9046fe99fd 100644 --- a/tests/baselines/reference/jsDeclarationsJSDocRedirectedLookups.js +++ b/tests/baselines/reference/jsDeclarationsJSDocRedirectedLookups.js @@ -85,14 +85,14 @@ //// [DtsFileErrors] -out/index.d.ts(14,39): error TS2304: Cannot find name 'class'. -out/index.d.ts(15,38): error TS2304: Cannot find name 'bool'. -out/index.d.ts(16,37): error TS2304: Cannot find name 'int'. -out/index.d.ts(17,39): error TS2552: Cannot find name 'float'. Did you mean 'GLfloat'? -out/index.d.ts(18,41): error TS2304: Cannot find name 'integer'. +tests/cases/conformance/jsdoc/declarations/out/index.d.ts(14,39): error TS2304: Cannot find name 'class'. +tests/cases/conformance/jsdoc/declarations/out/index.d.ts(15,38): error TS2304: Cannot find name 'bool'. +tests/cases/conformance/jsdoc/declarations/out/index.d.ts(16,37): error TS2304: Cannot find name 'int'. +tests/cases/conformance/jsdoc/declarations/out/index.d.ts(17,39): error TS2552: Cannot find name 'float'. Did you mean 'GLfloat'? +tests/cases/conformance/jsdoc/declarations/out/index.d.ts(18,41): error TS2304: Cannot find name 'integer'. -==== ./out/index.d.ts (5 errors) ==== +==== tests/cases/conformance/jsdoc/declarations/out/index.d.ts (5 errors) ==== /** @type {String} */ declare const a: string; /** @type {Number} */ declare const b: number; /** @type {Boolean} */ declare const c: boolean; diff --git a/tests/baselines/reference/jsDeclarationsNonIdentifierInferredNames.js b/tests/baselines/reference/jsDeclarationsNonIdentifierInferredNames.js index b722b8872ca..5fcc5dd0685 100644 --- a/tests/baselines/reference/jsDeclarationsNonIdentifierInferredNames.js +++ b/tests/baselines/reference/jsDeclarationsNonIdentifierInferredNames.js @@ -25,10 +25,10 @@ export {}; //// [DtsFileErrors] -out/jsDeclarationsNonIdentifierInferredNames.d.ts(4,5): error TS2503: Cannot find namespace 'JSX'. +tests/cases/conformance/jsdoc/declarations/out/jsDeclarationsNonIdentifierInferredNames.d.ts(4,5): error TS2503: Cannot find namespace 'JSX'. -==== ./out/jsDeclarationsNonIdentifierInferredNames.d.ts (1 errors) ==== +==== tests/cases/conformance/jsdoc/declarations/out/jsDeclarationsNonIdentifierInferredNames.d.ts (1 errors) ==== export function ExampleFunctionalComponent({ "data-testid": dataTestId, [dynPropName]: dynProp }: { "data-testid": any; "data-dyn": any; diff --git a/tests/baselines/reference/jsDeclarationsReactComponents.js b/tests/baselines/reference/jsDeclarationsReactComponents.js index d0c4a241528..01412b51b79 100644 --- a/tests/baselines/reference/jsDeclarationsReactComponents.js +++ b/tests/baselines/reference/jsDeclarationsReactComponents.js @@ -185,7 +185,7 @@ exports.default = Tree; //// [jsDeclarationsReactComponents1.d.ts] -/// +/// export default TabbedShowLayout; declare function TabbedShowLayout({}: {}): JSX.Element; declare namespace TabbedShowLayout { @@ -198,7 +198,7 @@ declare namespace TabbedShowLayout { } import PropTypes from "prop-types"; //// [jsDeclarationsReactComponents2.d.ts] -/// +/// export default TabbedShowLayout; /** * @type {React.SFC} @@ -228,7 +228,7 @@ declare namespace TabbedShowLayout { } } //// [jsDeclarationsReactComponents5.d.ts] -/// +/// export default Tree; declare function Tree({ allowDropOnRoot }: { allowDropOnRoot: any; diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map index c4a4eda35e2..2291166790d 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.js.map @@ -1,2 +1,2 @@ //// [a.js.map] -{"version":3,"file":"a.js","sourceRoot":"","sources":["../tests/cases/compiler/a.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"a.js","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt index fcc7e0b1fda..d20907f8937 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: a.js mapUrl: a.js.map sourceRoot: -sources: ../tests/cases/compiler/a.ts +sources: ../a.ts =================================================================== ------------------------------------------------------------------- -emittedFile:out/a.js -sourceFile:../tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/out/a.js +sourceFile:../a.ts ------------------------------------------------------------------- >>>var c = /** @class */ (function () { 1 > diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt index 0414a8f4cd7..700bc55a920 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -1,11 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would overwrite input file. - Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'outFile' instead. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would overwrite input file. -!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js index d87924e68ad..34cf44b63cf 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.js @@ -14,3 +14,8 @@ var c = /** @class */ (function () { } return c; }()); + + +//// [b.d.ts] +declare class c { +} diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt index 9ac70b004d4..b5d417a3f51 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -1,18 +1,18 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +error TS5055: Cannot write file '/b.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'outFile' instead. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. +!!! error TS5055: Cannot write file '/b.js' because it would overwrite input file. !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/compiler/a.ts (0 errors) ==== +==== /a.ts (0 errors) ==== class c { } -==== tests/cases/compiler/b.js (0 errors) ==== +==== /b.js (0 errors) ==== function foo() { } \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.symbols b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.symbols index 5260b8d6cf3..a5c2e6456ab 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.symbols +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.symbols @@ -1,9 +1,9 @@ -=== tests/cases/compiler/a.ts === +=== /a.ts === class c { >c : Symbol(c, Decl(a.ts, 0, 0)) } -=== tests/cases/compiler/b.js === +=== /b.js === function foo() { >foo : Symbol(foo, Decl(b.js, 0, 0)) } diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.types b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.types index dce83eeb8eb..bf2379d24bc 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.types +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.types @@ -1,9 +1,9 @@ -=== tests/cases/compiler/a.ts === +=== /a.ts === class c { >c : c } -=== tests/cases/compiler/b.js === +=== /b.js === function foo() { >foo : () => void } diff --git a/tests/baselines/reference/library-reference-1.trace.json b/tests/baselines/reference/library-reference-1.trace.json index 173d0c128fb..80f8b8e4ab2 100644 --- a/tests/baselines/reference/library-reference-1.trace.json +++ b/tests/baselines/reference/library-reference-1.trace.json @@ -1,90 +1,94 @@ [ - "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "File 'types/jquery.d.ts' does not exist.", - "File 'types/jquery/package.json' does not exist.", - "File 'types/jquery/index.d.ts' exists - use it as a name resolution result.", - "Resolving real path for 'types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'.", + "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory '/src/types'. ========", + "Resolving with primary search path '/src/types'.", + "File '/src/types/jquery.d.ts' does not exist.", + "File '/src/types/jquery/package.json' does not exist.", + "File '/src/types/jquery/index.d.ts' exists - use it as a name resolution result.", + "Resolving real path for '/src/types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/types/jquery/index.d.ts', primary: true. ========", - "======== Resolving type reference directive 'jquery', containing file '/src/__inferred type names__.ts'. ========", - "Resolution for type reference directive 'jquery' was found in cache from location '/src'.", + "======== Resolving type reference directive 'jquery', containing file '/.src/__inferred type names__.ts', root directory '/src/types'. ========", + "Resolving with primary search path '/src/types'.", + "File '/src/types/jquery.d.ts' does not exist.", + "File '/src/types/jquery/package.json' does not exist according to earlier cached lookups.", + "File '/src/types/jquery/index.d.ts' exists - use it as a name resolution result.", + "Resolving real path for '/src/types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/types/jquery/index.d.ts', primary: true. ========", - "======== Resolving module '@typescript/lib-es5' from '/src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '/src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '/src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '/src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '/src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '/src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-10.trace.json b/tests/baselines/reference/library-reference-10.trace.json index 605574ba9fb..937099add14 100644 --- a/tests/baselines/reference/library-reference-10.trace.json +++ b/tests/baselines/reference/library-reference-10.trace.json @@ -1,92 +1,97 @@ [ - "======== Resolving type reference directive 'jquery', containing file '/foo/consumer.ts', root directory './types'. ========", - "Resolving with primary search path './types'.", - "File './types/jquery.d.ts' does not exist.", - "Found 'package.json' at './types/jquery/package.json'.", + "======== Resolving type reference directive 'jquery', containing file '/foo/consumer.ts', root directory '/foo/types'. ========", + "Resolving with primary search path '/foo/types'.", + "File '/foo/types/jquery.d.ts' does not exist.", + "Found 'package.json' at '/foo/types/jquery/package.json'.", "'package.json' does not have a 'typesVersions' field.", - "'package.json' has 'typings' field 'jquery.d.ts' that references 'types/jquery/jquery.d.ts'.", - "File 'types/jquery/jquery.d.ts' exists - use it as a name resolution result.", - "Resolving real path for 'types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'.", + "'package.json' has 'typings' field 'jquery.d.ts' that references '/foo/types/jquery/jquery.d.ts'.", + "File '/foo/types/jquery/jquery.d.ts' exists - use it as a name resolution result.", + "Resolving real path for '/foo/types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/foo/types/jquery/jquery.d.ts', primary: true. ========", - "======== Resolving type reference directive 'jquery', containing file '/foo/__inferred type names__.ts'. ========", - "Resolution for type reference directive 'jquery' was found in cache from location '/foo'.", + "======== Resolving type reference directive 'jquery', containing file '/.src/__inferred type names__.ts', root directory '/foo/types'. ========", + "Resolving with primary search path '/foo/types'.", + "File '/foo/types/jquery.d.ts' does not exist.", + "File '/foo/types/jquery/package.json' exists according to earlier cached lookups.", + "'package.json' has 'typings' field 'jquery.d.ts' that references '/foo/types/jquery/jquery.d.ts'.", + "File '/foo/types/jquery/jquery.d.ts' exists - use it as a name resolution result.", + "Resolving real path for '/foo/types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/foo/types/jquery/jquery.d.ts', primary: true. ========", - "======== Resolving module '@typescript/lib-es5' from '/foo/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '/foo/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '/foo/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '/foo/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '/foo/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '/foo/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/foo/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-15.trace.json b/tests/baselines/reference/library-reference-15.trace.json index 9c68e594ceb..81e40d2da59 100644 --- a/tests/baselines/reference/library-reference-15.trace.json +++ b/tests/baselines/reference/library-reference-15.trace.json @@ -1,87 +1,87 @@ [ - "======== Resolving type reference directive 'jquery', containing file '/a/__inferred type names__.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "File 'types/jquery.d.ts' does not exist.", - "File 'types/jquery/package.json' does not exist.", - "File 'types/jquery/index.d.ts' exists - use it as a name resolution result.", - "Resolving real path for 'types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'.", + "======== Resolving type reference directive 'jquery', containing file '/.src/__inferred type names__.ts', root directory '/a/types'. ========", + "Resolving with primary search path '/a/types'.", + "File '/a/types/jquery.d.ts' does not exist.", + "File '/a/types/jquery/package.json' does not exist.", + "File '/a/types/jquery/index.d.ts' exists - use it as a name resolution result.", + "Resolving real path for '/a/types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/types/jquery/index.d.ts', primary: true. ========", - "======== Resolving module '@typescript/lib-es5' from '/a/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '/a/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '/a/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '/a/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '/a/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '/a/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", - "Directory '/a/node_modules' does not exist, skipping all lookups in it.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-5.trace.json b/tests/baselines/reference/library-reference-5.trace.json index 9f234c41826..a56af58d6f0 100644 --- a/tests/baselines/reference/library-reference-5.trace.json +++ b/tests/baselines/reference/library-reference-5.trace.json @@ -1,7 +1,7 @@ [ - "======== Resolving type reference directive 'foo', containing file '/src/root.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "Directory 'types' does not exist, skipping all lookups in it.", + "======== Resolving type reference directive 'foo', containing file '/src/root.ts', root directory '/tests/cases/conformance/references/types'. ========", + "Resolving with primary search path '/tests/cases/conformance/references/types'.", + "Directory '/tests/cases/conformance/references/types' does not exist, skipping all lookups in it.", "Looking up in 'node_modules' folder, initial location '/src'.", "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", @@ -10,9 +10,9 @@ "File '/node_modules/foo/index.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/foo/index.d.ts', result '/node_modules/foo/index.d.ts'.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", - "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "Directory 'types' does not exist, skipping all lookups in it.", + "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory '/tests/cases/conformance/references/types'. ========", + "Resolving with primary search path '/tests/cases/conformance/references/types'.", + "Directory '/tests/cases/conformance/references/types' does not exist, skipping all lookups in it.", "Looking up in 'node_modules' folder, initial location '/src'.", "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", @@ -21,9 +21,9 @@ "File '/node_modules/bar/index.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/bar/index.d.ts', result '/node_modules/bar/index.d.ts'.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", - "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "Directory 'types' does not exist, skipping all lookups in it.", + "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory '/tests/cases/conformance/references/types'. ========", + "Resolving with primary search path '/tests/cases/conformance/references/types'.", + "Directory '/tests/cases/conformance/references/types' does not exist, skipping all lookups in it.", "Looking up in 'node_modules' folder, initial location '/node_modules/foo'.", "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", @@ -31,9 +31,9 @@ "File '/node_modules/foo/node_modules/alpha/index.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/foo/node_modules/alpha/index.d.ts', result '/node_modules/foo/node_modules/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", - "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "Directory 'types' does not exist, skipping all lookups in it.", + "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory '/tests/cases/conformance/references/types'. ========", + "Resolving with primary search path '/tests/cases/conformance/references/types'.", + "Directory '/tests/cases/conformance/references/types' does not exist, skipping all lookups in it.", "Looking up in 'node_modules' folder, initial location '/node_modules/bar'.", "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", diff --git a/tests/baselines/reference/library-reference-scoped-packages.trace.json b/tests/baselines/reference/library-reference-scoped-packages.trace.json index 008e86ea994..bedfa918d58 100644 --- a/tests/baselines/reference/library-reference-scoped-packages.trace.json +++ b/tests/baselines/reference/library-reference-scoped-packages.trace.json @@ -1,7 +1,7 @@ [ - "======== Resolving type reference directive '@beep/boop', containing file '/a.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'.", - "Directory 'types' does not exist, skipping all lookups in it.", + "======== Resolving type reference directive '@beep/boop', containing file '/a.ts', root directory '/.src/tests/cases/conformance/references/types'. ========", + "Resolving with primary search path '/.src/tests/cases/conformance/references/types'.", + "Directory '/.src/tests/cases/conformance/references/types' does not exist, skipping all lookups in it.", "Looking up in 'node_modules' folder, initial location '/'.", "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Scoped package detected, looking in 'beep__boop'", diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js index 1763a30bdf1..8488fb2e916 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js +++ b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js @@ -58,11 +58,11 @@ export { fs2 }; //// [index.d.ts] -/// +/// import fs2 = require("fs"); //// [index.d.ts] -/// +/// import fs2 = require("fs"); //// [file.d.ts] -/// +/// import fs2 = require("fs"); diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=nodenext).js index 1763a30bdf1..8488fb2e916 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=nodenext).js +++ b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=nodenext).js @@ -58,11 +58,11 @@ export { fs2 }; //// [index.d.ts] -/// +/// import fs2 = require("fs"); //// [index.d.ts] -/// +/// import fs2 = require("fs"); //// [file.d.ts] -/// +/// import fs2 = require("fs"); diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js index 527c2cc583a..7c584a82861 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js +++ b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js @@ -43,6 +43,6 @@ export * as fs from "fs"; export * from "fs"; export * as fs from "fs"; //// [index.d.ts] -/// +/// export * from "fs"; export * as fs from "fs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).js b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).js index 527c2cc583a..7c584a82861 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).js +++ b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).js @@ -43,6 +43,6 @@ export * as fs from "fs"; export * from "fs"; export * as fs from "fs"; //// [index.d.ts] -/// +/// export * from "fs"; export * as fs from "fs"; diff --git a/tests/baselines/reference/out-flag2.js.map b/tests/baselines/reference/out-flag2.js.map index 090a43a6933..d984f1d5fbe 100644 --- a/tests/baselines/reference/out-flag2.js.map +++ b/tests/baselines/reference/out-flag2.js.map @@ -1,3 +1,3 @@ //// [c.js.map] -{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACAX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXO0FDQVg7SUFBQTtJQUFVLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQUFYLElBQVcifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K +{"version":3,"file":"c.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACAX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXO0FDQVg7SUFBQTtJQUFVLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQUFYLElBQVcifQ==,Y2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K diff --git a/tests/baselines/reference/out-flag2.sourcemap.txt b/tests/baselines/reference/out-flag2.sourcemap.txt index 47a05ee3976..533f7629646 100644 --- a/tests/baselines/reference/out-flag2.sourcemap.txt +++ b/tests/baselines/reference/out-flag2.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: c.js mapUrl: c.js.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/b.ts +sources: a.ts,b.ts =================================================================== ------------------------------------------------------------------- -emittedFile:c.js -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/c.js +sourceFile:a.ts ------------------------------------------------------------------- >>>var A = /** @class */ (function () { 1 > @@ -53,8 +53,8 @@ sourceFile:tests/cases/compiler/a.ts 4 >Emitted(5, 6) Source(1, 12) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:c.js -sourceFile:tests/cases/compiler/b.ts +emittedFile:tests/cases/compiler/c.js +sourceFile:b.ts ------------------------------------------------------------------- >>>var B = /** @class */ (function () { 1-> diff --git a/tests/baselines/reference/out-flag3.js.map b/tests/baselines/reference/out-flag3.js.map index 3f4ef4645bb..dc7e430263f 100644 --- a/tests/baselines/reference/out-flag3.js.map +++ b/tests/baselines/reference/out-flag3.js.map @@ -1,3 +1,3 @@ //// [c.js.map] -{"version":3,"file":"c.js","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACFX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcg0KdmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUU1QjtJQUFBO0lBQVUsQ0FBQztJQUFELFFBQUM7QUFBRCxDQUFDLEFBQVgsSUFBVztBQ0ZYO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXIn0=,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcgoKY2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K +{"version":3,"file":"c.js","sourceRoot":"","sources":["a.ts","b.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW;ACFX;IAAA;IAAU,CAAC;IAAD,QAAC;AAAD,CAAC,AAAX,IAAW"} +//// https://sokra.github.io/source-map-visualization#base64,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcg0KdmFyIEEgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQSgpIHsNCiAgICB9DQogICAgcmV0dXJuIEE7DQp9KCkpOw0KdmFyIEIgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQigpIHsNCiAgICB9DQogICAgcmV0dXJuIEI7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Yy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUU1QjtJQUFBO0lBQVUsQ0FBQztJQUFELFFBQUM7QUFBRCxDQUFDLEFBQVgsSUFBVztBQ0ZYO0lBQUE7SUFBVSxDQUFDO0lBQUQsUUFBQztBQUFELENBQUMsQUFBWCxJQUFXIn0=,Ly8gLS1vdXQgYW5kIC0tb3V0RmlsZSBlcnJvcgoKY2xhc3MgQSB7IH0K,Y2xhc3MgQiB7IH0K diff --git a/tests/baselines/reference/out-flag3.sourcemap.txt b/tests/baselines/reference/out-flag3.sourcemap.txt index c6530af2573..0bd3a39eb36 100644 --- a/tests/baselines/reference/out-flag3.sourcemap.txt +++ b/tests/baselines/reference/out-flag3.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: c.js mapUrl: c.js.map sourceRoot: -sources: tests/cases/compiler/a.ts,tests/cases/compiler/b.ts +sources: a.ts,b.ts =================================================================== ------------------------------------------------------------------- -emittedFile:c.js -sourceFile:tests/cases/compiler/a.ts +emittedFile:tests/cases/compiler/c.js +sourceFile:a.ts ------------------------------------------------------------------- >>>// --out and --outFile error 1 > @@ -64,8 +64,8 @@ sourceFile:tests/cases/compiler/a.ts 4 >Emitted(6, 6) Source(3, 12) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:c.js -sourceFile:tests/cases/compiler/b.ts +emittedFile:tests/cases/compiler/c.js +sourceFile:b.ts ------------------------------------------------------------------- >>>var B = /** @class */ (function () { 1-> diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 0d44d7846ad..906fd71ff79 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,3 +1,3 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;IAAA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;;;ICCd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fA0KICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fA0KICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxs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sgfQ== +{"version":3,"file":"all.js","sourceRoot":"","sources":["ref/a.ts","b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;IAAA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;;;ICCd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fA0KICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fA0KICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGIsIHApKSBkW3BdID0gYltwXTsgfTsNCiAgICAgICAgcmV0dXJuIGV4dGVuZFN0YXRpY3MoZCwgYik7DQogICAgfTsNCiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgaWYgKHR5cGVvZiBiICE9PSAiZnVuY3Rpb24iICYmIGIgIT09IG51bGwpDQogICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIgKyBTdHJpbmcoYikgKyAiIGlzIG5vdCBhIGNvbnN0cnVjdG9yIG9yIG51bGwiKTsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBi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BwbHkodGhpcywgYXJndW1lbnRzKSB8fCB0aGlzOw0KICAgICAgICB9DQogICAgICAgIHJldHVybiBCOw0KICAgIH0oYV8xLkEpKTsNCiAgICBleHBvcnRzLkIgPSBCOw0KfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hbGwuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVmL2EudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUFBQTtRQUFBO1FBQWlCLENBQUM7UUFBRCxRQUFDO0lBQUQsQ0FBQyxBQUFsQixJQUFrQjtJQUFMLGNBQUM7Ozs7OztJQ0NkO1FBQXVCLHFCQUFDO1FBQXhCOztRQUEyQixDQUFDO1FBQUQsUUFBQztJQUFELENBQUMsQUFBNUIsQ0FBdUIsS0FBQyxHQUFJO0lBQWYsY0FBQyJ9,ZXhwb3J0IGNsYXNzIEEgeyB9Cg==,aW1wb3J0IHtBfSBmcm9tICIuL3JlZi9hIjsKZXhwb3J0IGNsYXNzIEIgZXh0ZW5kcyBBIHsgfQ== diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 3d23b747e62..03a630b6704 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: all.js mapUrl: all.js.map sourceRoot: -sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts +sources: ref/a.ts,b.ts =================================================================== ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/ref/a.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { >>> var extendStatics = function (d, b) { @@ -80,8 +80,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 >Emitted(25, 19) Source(1, 15) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/b.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:b.ts ------------------------------------------------------------------- >>>}); >>>define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index ee2ee739c85..51a8455ab60 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,3 +1,3 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;YAAA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCAD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fA0KICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fA0KICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoT2JqZWN0LnByb3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ydHNfMSgiQSIsIEEpOw0KICAgICAgICB9DQogICAgfTsNCn0pOw0KU3lzdGVtLnJlZ2lzdGVyKCJiIiwgWyJyZWYvYSJdLCBmdW5jdGlvbiAoZXhwb3J0c18yLCBjb250ZXh0XzIpIHsNCiAgICAidXNlIHN0cmljdCI7DQogICAgdmFyIGFfMSwgQjsNCiAgICB2YXIgX19tb2R1bGVOYW1lID0gY29udGV4dF8yICYmIGNvbnRleHRfMi5pZDsNCiAgICByZXR1cm4gew0KICAgICAgICBzZXR0ZXJzOiBbDQogICAgICAgICAgICBmdW5jdGlvbiAoYV8xXzEpIHsNCiAgICAgICAgICAgICAgICBhXzEgPSBhXzFfMTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgXSwNCiAgICAgICAgZXhlY3V0ZTogZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgQiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsNCiAgICAgICAgICAgICAgICBfX2V4dGVuZHMoQiwgX3N1cGVyKTsNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBCKCkgew0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIHJldHVybiBCOw0KICAgICAgICAgICAgfShhXzEuQSkpOw0KICAgICAgICAgICAgZXhwb3J0c18yKCJCIiwgQik7DQogICAgICAgIH0NCiAgICB9Ow0KfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hbGwuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdHMvY2FzZXMvY29tcGlsZXIvcmVmL2EudHMiLCJ0ZXN0cy9jYXNlcy9jb21waWxlci9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ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gICAgICAgICAgIGV4cG9ydHNfMSgiQSIsIEEpOw0KICAgICAgICB9DQogICAgfTsNCn0pOw0KU3lzdGVtLnJlZ2lzdGVyKCJiIiwgWyJyZWYvYSJdLCBmdW5jdGlvbiAoZXhwb3J0c18yLCBjb250ZXh0XzIpIHsNCiAgICAidXNlIHN0cmljdCI7DQogICAgdmFyIGFfMSwgQjsNCiAgICB2YXIgX19tb2R1bGVOYW1lID0gY29udGV4dF8yICYmIGNvbnRleHRfMi5pZDsNCiAgICByZXR1cm4gew0KICAgICAgICBzZXR0ZXJzOiBbDQogICAgICAgICAgICBmdW5jdGlvbiAoYV8xXzEpIHsNCiAgICAgICAgICAgICAgICBhXzEgPSBhXzFfMTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgXSwNCiAgICAgICAgZXhlY3V0ZTogZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgQiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHsNCiAgICAgICAgICAgICAgICBfX2V4dGVuZHMoQiwgX3N1cGVyKTsNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBCKCkgew0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpIHx8IHRoaXM7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIHJldHVybiBCOw0KICAgICAgICAgICAgfShhXzEuQSkpOw0KICAgICAgICAgICAgZXhwb3J0c18yKCJCIiwgQik7DQogICAgICAgIH0NCiAgICB9Ow0KfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1hbGwuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVmL2EudHMiLCJiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7WUFBQTtnQkFBQTtnQkFBaUIsQ0FBQztnQkFBRCxRQUFDO1lBQUQsQ0FBQyxBQUFsQixJQUFrQjs7UUFDbEIsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7WUNBRDtnQkFBdUIscUJBQUM7Z0JBQXhCOztnQkFBMkIsQ0FBQztnQkFBRCxRQUFDO1lBQUQsQ0FBQyxBQUE1QixDQUF1QixLQUFDLEdBQUk7O1FBQUEsQ0FBQyJ9,ZXhwb3J0IGNsYXNzIEEgeyB9Cg==,aW1wb3J0IHtBfSBmcm9tICIuL3JlZi9hIjsKZXhwb3J0IGNsYXNzIEIgZXh0ZW5kcyBBIHsgfQ== diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 742cccc9f09..6f4655aef06 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: all.js mapUrl: all.js.map sourceRoot: -sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts +sources: ref/a.ts,b.ts =================================================================== ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/ref/a.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { >>> var extendStatics = function (d, b) { @@ -85,8 +85,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 >Emitted(29, 10) Source(2, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/b.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:b.ts ------------------------------------------------------------------- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 251e07a5476..2c6a0c33e18 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -79,7 +79,7 @@ define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { //# sourceMappingURL=all.js.map //// [all.d.ts] -/// +/// declare class Foo { member: Bar; } diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 61eb1e79dba..ae38a0fe94c 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,3 +1,3 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;;;ICHD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fA0KICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fA0KICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoT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Q2pDO0lBQUE7SUFFQSxDQUFDO0lBQUQsVUFBQztBQUFELENBQUMsQUFGRCxJQUVDOzs7OztJQ0hELCtCQUErQjtJQUMvQjtRQUFBO1FBRUEsQ0FBQztRQUFELFFBQUM7SUFBRCxDQUFDLEFBRkQsSUFFQztJQUZZLGNBQUM7Ozs7OztJQ0FkO1FBQXVCLHFCQUFDO1FBQXhCOztRQUEyQixDQUFDO1FBQUQsUUFBQztJQUFELENBQUMsQUFBNUIsQ0FBdUIsS0FBQyxHQUFJO0lBQWYsY0FBQyJ9,Ly8vIDxyZWZlcmVuY2UgcGF0aD0iLi9jLmQudHMiIC8+CmNsYXNzIEZvbyB7CgltZW1iZXI6IEJhcjsKfQpkZWNsYXJlIHZhciBHbG9iYWxGb286IEZvbzsK,Ly8vIDxyZWZlcmVuY2UgcGF0aD0iLi9iLnRzIiAvPgpleHBvcnQgY2xhc3MgQSB7CgltZW1iZXI6IHR5cGVvZiBHbG9iYWxGb287Cn0K,aW1wb3J0IHtBfSBmcm9tICIuL3JlZi9hIjsKZXhwb3J0IGNsYXNzIEIgZXh0ZW5kcyBBIHsgfQo= +{"version":3,"file":"all.js","sourceRoot":"","sources":["ref/b.ts","ref/a.ts","b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;;;ICHD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} +//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3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J2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVmL2IudHMiLCJyZWYvYS50cyIsImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaUNBQWlDO0FBQ2pDO0lBQUE7SUFFQSxDQUFDO0lBQUQsVUFBQztBQUFELENBQUMsQUFGRCxJQUVDOzs7OztJQ0hELCtCQUErQjtJQUMvQjtRQUFBO1FBRUEsQ0FBQztRQUFELFFBQUM7SUFBRCxDQUFDLEFBRkQsSUFFQztJQUZZLGNBQUM7Ozs7OztJQ0FkO1FBQXVCLHFCQUFDO1FBQXhCOztRQUEyQixDQUFDO1FBQUQsUUFBQztJQUFELENBQUMsQUFBNUIsQ0FBdUIsS0FBQyxHQUFJO0lBQWYsY0FBQyJ9,Ly8vIDxyZWZlcmVuY2UgcGF0aD0iLi9jLmQudHMiIC8+CmNsYXNzIEZvbyB7CgltZW1iZXI6IEJhcjsKfQpkZWNsYXJlIHZhciBHbG9iYWxGb286IEZvbzsK,Ly8vIDxyZWZlcmVuY2UgcGF0aD0iLi9iLnRzIiAvPgpleHBvcnQgY2xhc3MgQSB7CgltZW1iZXI6IHR5cGVvZiBHbG9iYWxGb287Cn0K,Ly8vIDxyZWZlcmVuY2UgcGF0aD0iLi9jLmQudHMiIC8+CmNsYXNzIEZvbyB7CgltZW1iZXI6IEJhcjsKfQpkZWNsYXJlIHZhciBHbG9iYWxGb286IEZvbzsK diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index ef9ca5aedb5..0c9857cb69d 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: all.js mapUrl: all.js.map sourceRoot: -sources: tests/cases/compiler/ref/b.ts,tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts +sources: ref/b.ts,ref/a.ts,b.ts =================================================================== ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/ref/b.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { >>> var extendStatics = function (d, b) { @@ -82,8 +82,8 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 >Emitted(21, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/ref/a.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:ref/a.ts ------------------------------------------------------------------- >>>define("ref/a", ["require", "exports"], function (require, exports) { >>> "use strict"; @@ -156,8 +156,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 >Emitted(32, 19) Source(2, 15) + SourceIndex(1) --- ------------------------------------------------------------------- -emittedFile:all.js -sourceFile:tests/cases/compiler/b.ts +emittedFile:tests/cases/compiler/all.js +sourceFile:b.ts ------------------------------------------------------------------- >>>}); >>>define("b", ["require", "exports", "ref/a"], function (require, exports, a_1) { diff --git a/tests/baselines/reference/requireOfJsonFile.js b/tests/baselines/reference/requireOfJsonFile.js index 9093dbfc4e2..b713d4f68b1 100644 --- a/tests/baselines/reference/requireOfJsonFile.js +++ b/tests/baselines/reference/requireOfJsonFile.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileNonRelative.js b/tests/baselines/reference/requireOfJsonFileNonRelative.js index e7a63e45244..3aff7f7c98b 100644 --- a/tests/baselines/reference/requireOfJsonFileNonRelative.js +++ b/tests/baselines/reference/requireOfJsonFileNonRelative.js @@ -22,7 +22,7 @@ if (x) { } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.js b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.js index 1092bd8955a..b81f5f7ca91 100644 --- a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.js +++ b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtension.js @@ -22,6 +22,6 @@ import e = require("e"); // Should fail "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtensionResolvesToTs.js b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtensionResolvesToTs.js index 8ad2a61f2b5..76fafedc84c 100644 --- a/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtensionResolvesToTs.js +++ b/tests/baselines/reference/requireOfJsonFileNonRelativeWithoutExtensionResolvesToTs.js @@ -14,10 +14,10 @@ let fnumber: number = f; export = 10; -//// [out/node_modules/f.js] +//// [tests/cases/compiler/out/node_modules/f.js] "use strict"; module.exports = 10; -//// [out/projects/file1.js] +//// [tests/cases/compiler/out/projects/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var f = require("f"); // should work to f.ts diff --git a/tests/baselines/reference/requireOfJsonFileTypes.js b/tests/baselines/reference/requireOfJsonFileTypes.js index d8fd00a4848..2c0c138ccd6 100644 --- a/tests/baselines/reference/requireOfJsonFileTypes.js +++ b/tests/baselines/reference/requireOfJsonFileTypes.js @@ -45,24 +45,24 @@ booleanLiteral = g[0]; //// [g.json] [true, false] -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello", "c": null, "d": false } -//// [out/c.json] +//// [tests/cases/compiler/out/c.json] ["a", null, "string"] -//// [out/d.json] +//// [tests/cases/compiler/out/d.json] "dConfig" -//// [out/e.json] +//// [tests/cases/compiler/out/e.json] -10 -//// [out/f.json] +//// [tests/cases/compiler/out/f.json] [-10, 30] -//// [out/g.json] +//// [tests/cases/compiler/out/g.json] [true, false] -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b = require("./b.json"); @@ -85,5 +85,5 @@ numberLiteral = f[0]; booleanLiteral = g[0]; -//// [out/file1.d.ts] +//// [tests/cases/compiler/out/file1.d.ts] export {}; diff --git a/tests/baselines/reference/requireOfJsonFileWithAmd.js b/tests/baselines/reference/requireOfJsonFileWithAmd.js index 984288a6b7c..9cdf04bf54f 100644 --- a/tests/baselines/reference/requireOfJsonFileWithAmd.js +++ b/tests/baselines/reference/requireOfJsonFileWithAmd.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] define(["require", "exports", "./b", "./b.json"], function (require, exports, b1, b2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithDeclaration.js b/tests/baselines/reference/requireOfJsonFileWithDeclaration.js index 7f51f8ada80..20cfda7a306 100644 --- a/tests/baselines/reference/requireOfJsonFileWithDeclaration.js +++ b/tests/baselines/reference/requireOfJsonFileWithDeclaration.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); @@ -32,5 +32,5 @@ if (x) { } -//// [out/file1.d.ts] +//// [tests/cases/compiler/out/file1.d.ts] export {}; diff --git a/tests/baselines/reference/requireOfJsonFileWithEmptyObject.js b/tests/baselines/reference/requireOfJsonFileWithEmptyObject.js index fff8f7f26ff..d1f16a5064a 100644 --- a/tests/baselines/reference/requireOfJsonFileWithEmptyObject.js +++ b/tests/baselines/reference/requireOfJsonFileWithEmptyObject.js @@ -12,9 +12,9 @@ if (x) { { } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] {} -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithEmptyObjectWithErrors.js b/tests/baselines/reference/requireOfJsonFileWithEmptyObjectWithErrors.js index 285fcb9bdc6..9c1be09deef 100644 --- a/tests/baselines/reference/requireOfJsonFileWithEmptyObjectWithErrors.js +++ b/tests/baselines/reference/requireOfJsonFileWithEmptyObjectWithErrors.js @@ -13,9 +13,9 @@ if (x) { { } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] {} -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithErrors.js b/tests/baselines/reference/requireOfJsonFileWithErrors.js index 1bcb1ca39ae..21e9f90b149 100644 --- a/tests/baselines/reference/requireOfJsonFileWithErrors.js +++ b/tests/baselines/reference/requireOfJsonFileWithErrors.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { 'a': true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.js b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.js index f99ccbf6a5a..5d09bf571a0 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleEmitNone.js @@ -9,11 +9,11 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleEmitUndefined.js b/tests/baselines/reference/requireOfJsonFileWithModuleEmitUndefined.js index 26266baf0ca..63f24df289d 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleEmitUndefined.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleEmitUndefined.js @@ -9,11 +9,11 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmd.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmd.js index ace649a8626..e10023410ca 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmd.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmd.js @@ -9,12 +9,12 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmdOutFile.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmdOutFile.js index 3b3d13f4f3d..f49f0dbe060 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmdOutFile.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitAmdOutFile.js @@ -9,7 +9,7 @@ import * as b from './b.json'; "b": "hello" } -//// [out/output.js] +//// [tests/cases/compiler/out/output.js] define("b", [], { "a": true, "b": "hello" diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEs2015.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEs2015.js index 60bb84c2b3d..37495669699 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEs2015.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEs2015.js @@ -9,10 +9,10 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] export {}; diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEsNext.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEsNext.js index 2f37693eed3..01d1f0d38b7 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEsNext.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitEsNext.js @@ -9,10 +9,10 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] export {}; diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitNone.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitNone.js index 897a14fb51f..4279692ef36 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitNone.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitNone.js @@ -9,11 +9,11 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitSystem.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitSystem.js index 5174a101848..cf8cb671807 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitSystem.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitSystem.js @@ -9,12 +9,12 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUmd.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUmd.js index d62dac4b97e..7f54381914a 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUmd.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUmd.js @@ -9,12 +9,12 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] (function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); diff --git a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUndefined.js b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUndefined.js index 4943fbca648..0d5190dd30b 100644 --- a/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUndefined.js +++ b/tests/baselines/reference/requireOfJsonFileWithModuleNodeResolutionEmitUndefined.js @@ -9,11 +9,11 @@ import * as b from './b.json'; "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithNoContent.js b/tests/baselines/reference/requireOfJsonFileWithNoContent.js index 9f2b711855a..07bc9f73338 100644 --- a/tests/baselines/reference/requireOfJsonFileWithNoContent.js +++ b/tests/baselines/reference/requireOfJsonFileWithNoContent.js @@ -12,8 +12,8 @@ if (x) { //// [b.json] -//// [out/b.json] -//// [out/file1.js] +//// [tests/cases/compiler/out/b.json] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithSourceMap.js b/tests/baselines/reference/requireOfJsonFileWithSourceMap.js index 79b91792e72..18f969c25f7 100644 --- a/tests/baselines/reference/requireOfJsonFileWithSourceMap.js +++ b/tests/baselines/reference/requireOfJsonFileWithSourceMap.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithSourceMap.js.map b/tests/baselines/reference/requireOfJsonFileWithSourceMap.js.map index d0848a65469..cdbea3dbdf1 100644 --- a/tests/baselines/reference/requireOfJsonFileWithSourceMap.js.map +++ b/tests/baselines/reference/requireOfJsonFileWithSourceMap.js.map @@ -1,2 +1,2 @@ -//// [out/file1.js.map] -{"version":3,"file":"file1.js","sourceRoot":"","sources":["../tests/cases/compiler/file1.ts"],"names":[],"mappings":";;AAAA,6BAAgC;AAChC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACb,6BAAgC;AAChC,IAAI,CAAC,EAAE;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACb,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;CACpB"} \ No newline at end of file +//// [tests/cases/compiler/out/file1.js.map] +{"version":3,"file":"file1.js","sourceRoot":"","sources":["../file1.ts"],"names":[],"mappings":";;AAAA,6BAAgC;AAChC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACb,6BAAgC;AAChC,IAAI,CAAC,EAAE;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACb,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;CACpB"} \ No newline at end of file diff --git a/tests/baselines/reference/requireOfJsonFileWithSourceMap.sourcemap.txt b/tests/baselines/reference/requireOfJsonFileWithSourceMap.sourcemap.txt index c2360484aec..d3c36f653fc 100644 --- a/tests/baselines/reference/requireOfJsonFileWithSourceMap.sourcemap.txt +++ b/tests/baselines/reference/requireOfJsonFileWithSourceMap.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: file1.js mapUrl: file1.js.map sourceRoot: -sources: ../tests/cases/compiler/file1.ts +sources: ../file1.ts =================================================================== ------------------------------------------------------------------- -emittedFile:out/file1.js -sourceFile:../tests/cases/compiler/file1.ts +emittedFile:tests/cases/compiler/out/file1.js +sourceFile:../file1.ts ------------------------------------------------------------------- >>>"use strict"; >>>Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithTraillingComma.js b/tests/baselines/reference/requireOfJsonFileWithTraillingComma.js index 1cd7742d1c7..3a6be0bb12b 100644 --- a/tests/baselines/reference/requireOfJsonFileWithTraillingComma.js +++ b/tests/baselines/reference/requireOfJsonFileWithTraillingComma.js @@ -15,12 +15,12 @@ if (x) { "b": "hello", } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithoutAllowJs.js b/tests/baselines/reference/requireOfJsonFileWithoutAllowJs.js index 669a228bb98..b696b66838d 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutAllowJs.js +++ b/tests/baselines/reference/requireOfJsonFileWithoutAllowJs.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); diff --git a/tests/baselines/reference/requireOfJsonFileWithoutEsModuleInterop.js b/tests/baselines/reference/requireOfJsonFileWithoutEsModuleInterop.js index ea5ac25b1b5..4a01709bec8 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutEsModuleInterop.js +++ b/tests/baselines/reference/requireOfJsonFileWithoutEsModuleInterop.js @@ -9,11 +9,11 @@ import * as test from "./test.json" "b": "hello" } -//// [out/test.json] +//// [tests/cases/compiler/out/test.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/requireOfJsonFileWithoutExtension.js b/tests/baselines/reference/requireOfJsonFileWithoutExtension.js index 98e82ed6dde..f73b01e60c9 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutExtension.js +++ b/tests/baselines/reference/requireOfJsonFileWithoutExtension.js @@ -15,12 +15,12 @@ if (x) { "b": "hello" } -//// [out/b.json] +//// [tests/cases/compiler/out/b.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b"); // This should not resolve diff --git a/tests/baselines/reference/requireOfJsonFileWithoutExtensionResolvesToTs.js b/tests/baselines/reference/requireOfJsonFileWithoutExtensionResolvesToTs.js index f2de4e6a59e..1ccb40ccc45 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutExtensionResolvesToTs.js +++ b/tests/baselines/reference/requireOfJsonFileWithoutExtensionResolvesToTs.js @@ -24,15 +24,15 @@ if (x2) { //// [c.ts] export = { a: true, b: "hello" }; -//// [out/c.js] +//// [tests/cases/compiler/out/c.js] "use strict"; module.exports = { a: true, b: "hello" }; -//// [out/c.json] +//// [tests/cases/compiler/out/c.json] { "a": true, "b": "hello" } -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var c1 = require("./c"); // resolves to c.ts diff --git a/tests/baselines/reference/requireOfJsonFileWithoutResolveJsonModule.js b/tests/baselines/reference/requireOfJsonFileWithoutResolveJsonModule.js index 3fedccc7d84..e8cc3d3ed0f 100644 --- a/tests/baselines/reference/requireOfJsonFileWithoutResolveJsonModule.js +++ b/tests/baselines/reference/requireOfJsonFileWithoutResolveJsonModule.js @@ -12,7 +12,7 @@ if (x) { //// [b.json] contents Not read -//// [out/file1.js] +//// [tests/cases/compiler/out/file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var b1 = require("./b.json"); // error diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map index f34c47f2210..da65cbe4cfb 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.js.map @@ -1,2 +1,2 @@ //// [fooResult.js.map] -{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../testFiles/app.ts","../testFiles/app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC;ACHD;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file +{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../tests/cases/compiler/testFiles/app.ts","../tests/cases/compiler/testFiles/app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wIAAwI;AACxI;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC;ACHD;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt index 834b858a7dc..62f89e7fb16 100644 --- a/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithCaseSensitiveFileNames.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: fooResult.js mapUrl: fooResult.js.map sourceRoot: -sources: ../testFiles/app.ts,../testFiles/app2.ts +sources: ../tests/cases/compiler/testFiles/app.ts,../tests/cases/compiler/testFiles/app2.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/testfiles/fooResult.js -sourceFile:../testFiles/app.ts +emittedFile:testfiles/fooResult.js +sourceFile:../tests/cases/compiler/testFiles/app.ts ------------------------------------------------------------------- >>>// Note in the out result we are using same folder name only different in casing 1 > @@ -74,8 +74,8 @@ sourceFile:../testFiles/app.ts 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/testfiles/fooResult.js -sourceFile:../testFiles/app2.ts +emittedFile:testfiles/fooResult.js +sourceFile:../tests/cases/compiler/testFiles/app2.ts ------------------------------------------------------------------- >>>var d = /** @class */ (function () { 1-> diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map index 7a56ccbd998..58c51aafcb7 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.js.map @@ -1,3 +1,2 @@ //// [fooResult.js.map] -{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["app.ts","app2.ts"],"names":[],"mappings":"AAAA,gFAA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Bmb2xkZXIgbmFtZSBvbmx5IGRpZmZlcmVudCBpbiBjYXNpbmcKLy8gU2luY2UgdGhpcyBpcyBub24gY2FzZSBzZW5zaXRpdmUsIHRoZSByZWxhdGl2ZSBwYXRocyBzaG91bGQgYmUganVzdCBhcHAudHMgYW5kIGFwcDIudHMgaW4gdGhlIHNvdXJjZW1hcApjbGFzcyBjIHsKfQo=,Y2xhc3MgZCB7Cn0= +{"version":3,"file":"fooResult.js","sourceRoot":"","sources":["../tests/cases/compiler/testFiles/app.ts","../tests/cases/compiler/testFiles/app2.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0GAA0G;AAC1G;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC;ACHD;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt index 9b54bd34d71..f890e837507 100644 --- a/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt +++ b/tests/baselines/reference/sourceMapWithNonCaseSensitiveFileNames.sourcemap.txt @@ -2,11 +2,11 @@ JsFile: fooResult.js mapUrl: fooResult.js.map sourceRoot: -sources: app.ts,app2.ts +sources: ../tests/cases/compiler/testFiles/app.ts,../tests/cases/compiler/testFiles/app2.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/testfiles/fooResult.js -sourceFile:app.ts +emittedFile:testfiles/fooResult.js +sourceFile:../tests/cases/compiler/testFiles/app.ts ------------------------------------------------------------------- >>>// Note in the out result we are using same folder name only different in casing 1 > @@ -74,8 +74,8 @@ sourceFile:app.ts 4 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- -emittedFile:tests/cases/compiler/testfiles/fooResult.js -sourceFile:app2.ts +emittedFile:testfiles/fooResult.js +sourceFile:../tests/cases/compiler/testFiles/app2.ts ------------------------------------------------------------------- >>>var d = /** @class */ (function () { 1-> diff --git a/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts b/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts index 58fae79a613..a8f20df82a3 100644 --- a/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts +++ b/tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts @@ -1,7 +1,7 @@ // @noResolve: true // @declaration: true // @module: amd -// @outFile: tests/cases/compiler/out/datastore.bundle.js +// @outFile: out/datastore.bundle.js // @filename: lib/lib.d.ts declare module "lib/result" { export type Result = (E & Failure) | (T & Success); diff --git a/tests/cases/compiler/declarationEmitPathMappingMonorepo.ts b/tests/cases/compiler/declarationEmitPathMappingMonorepo.ts index 998ef63fae2..ea392197ba4 100644 --- a/tests/cases/compiler/declarationEmitPathMappingMonorepo.ts +++ b/tests/cases/compiler/declarationEmitPathMappingMonorepo.ts @@ -24,5 +24,5 @@ export function b(text: string) { } } -// @link: tests/cases/compiler/packages/a -> tests/cases/compiler/node_modules/@ts-bug/a -// @link: tests/cases/compiler/packages/b -> tests/cases/compiler/node_modules/@ts-bug/b +// @link: packages/a -> node_modules/@ts-bug/a +// @link: packages/b -> node_modules/@ts-bug/b diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts index 3cdce58fe65..4bb09d93c44 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts @@ -1,8 +1,8 @@ // @declaration: true // @target: es5 -// @baseUrl: /.src/tests/cases/compiler +// @baseUrl: . // @outDir: ./dist -// @rootDir: ./tests/cases/compiler/src +// @rootDir: ./src // @filename: src/lib/operators/scalar.ts export interface Scalar { (): string; diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts index df57d488fbb..ad40e87fffe 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts @@ -1,9 +1,9 @@ // @declaration: true // @target: es5 -// @baseUrl: /.src/tests/cases/compiler +// @baseUrl: . // @module: amd // @outFile: ./dist.js -// @rootDir: ./tests/cases/compiler/src +// @rootDir: ./src // @filename: src/lib/operators/scalar.ts export interface Scalar { (): string; diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts index d0f58e2ede7..a75d82d0ddd 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts @@ -52,5 +52,5 @@ export const ADMIN = MetadataAccessor.create('1'); "declaration": true } } -// @link: tests/cases/compiler/monorepo/pkg1 -> tests/cases/compiler/monorepo/pkg2/node_modules/@raymondfeng/pkg1 -// @link: tests/cases/compiler/monorepo/pkg2 -> tests/cases/compiler/monorepo/pkg3/node_modules/@raymondfeng/pkg2 +// @link: monorepo/pkg1 -> monorepo/pkg2/node_modules/@raymondfeng/pkg1 +// @link: monorepo/pkg2 -> monorepo/pkg3/node_modules/@raymondfeng/pkg2 diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts index 764a2c3f0ba..b3e66832e70 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts @@ -55,5 +55,5 @@ export const ADMIN = MetadataAccessor.create('1'); "declaration": true } } -// @link: tests/cases/compiler/monorepo/pkg1 -> tests/cases/compiler/monorepo/pkg2/node_modules/@raymondfeng/pkg1 -// @link: tests/cases/compiler/monorepo/pkg2 -> tests/cases/compiler/monorepo/pkg3/node_modules/@raymondfeng/pkg2 +// @link: monorepo/pkg1 -> monorepo/pkg2/node_modules/@raymondfeng/pkg1 +// @link: monorepo/pkg2 -> monorepo/pkg3/node_modules/@raymondfeng/pkg2 diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts index e65b752a3a0..d9ee4d1f0fd 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts @@ -52,5 +52,5 @@ export const ADMIN = MetadataAccessor.create('1'); "declaration": true } } -// @link: tests/cases/compiler/monorepo/pkg1 -> tests/cases/compiler/monorepo/pkg2/node_modules/@raymondfeng/pkg1 -// @link: tests/cases/compiler/monorepo/pkg2 -> tests/cases/compiler/monorepo/pkg3/node_modules/@raymondfeng/pkg2 +// @link: monorepo/pkg1 -> monorepo/pkg2/node_modules/@raymondfeng/pkg1 +// @link: monorepo/pkg2 -> monorepo/pkg3/node_modules/@raymondfeng/pkg2 diff --git a/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts index a44f3014db3..dfe78d76929 100644 --- a/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts +++ b/tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts @@ -1,11 +1,11 @@ // @declaration: true -// @out: tests/cases/compiler/out.js +// @out: /out.js -// @Filename: out.d.ts +// @Filename: /out.d.ts declare class c { } -// @FileName: a.ts +// @FileName: /a.ts class d { } diff --git a/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts index e8770c99fba..dfb226844d1 100644 --- a/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts +++ b/tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts @@ -1,4 +1,4 @@ -// @out: tests/cases/compiler/a.js +// @out: a.js // @module: amd // @filename: a.ts export class c { diff --git a/tests/cases/compiler/jsDeclarationEmitExportedClassWithExtends.ts b/tests/cases/compiler/jsDeclarationEmitExportedClassWithExtends.ts index b0851437ffc..5434bd3f9c9 100644 --- a/tests/cases/compiler/jsDeclarationEmitExportedClassWithExtends.ts +++ b/tests/cases/compiler/jsDeclarationEmitExportedClassWithExtends.ts @@ -1,5 +1,5 @@ // @checkJs: true -// @outDir: tests/cases/compiler/out +// @outDir: out // @declaration: true // @module: esnext // @moduleResolution: nodenext diff --git a/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts index f1d772398d3..908af4b0c19 100644 --- a/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts +++ b/tests/cases/compiler/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.ts @@ -1,5 +1,5 @@ // @declaration: true -// @out: tests/cases/compiler/b.js +// @out: b.js // @filename: a.ts class c { } diff --git a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts index 16410244004..4bcfb132e00 100644 --- a/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts +++ b/tests/cases/compiler/jsFileCompilationWithOutFileNameSameAsInputJsFile.ts @@ -1,9 +1,9 @@ // @allowJs: true -// @out: tests/cases/compiler/b.js -// @filename: a.ts +// @out: /b.js +// @filename: /a.ts class c { } -// @filename: b.js +// @filename: /b.js function foo() { } diff --git a/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts b/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts index a0a8dfb8e7b..90bd5805766 100644 --- a/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts +++ b/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts @@ -1,6 +1,6 @@ // @module: nodenext // @outDir: ./dist -// @rootDir: tests/cases/compiler +// @rootDir: . // @filename: package.json { "name": "@this/package", diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts index 1e32c30e683..aa0434b0716 100644 --- a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts @@ -1,6 +1,6 @@ // @module: nodenext // @outDir: ./dist -// @rootDir: tests/cases/compiler +// @rootDir: . // @filename: package.json { "name": "@this/package", diff --git a/tests/cases/compiler/sourceMapWithCaseSensitiveFileNames.ts b/tests/cases/compiler/sourceMapWithCaseSensitiveFileNames.ts index d0dff702aae..ebb8cf13a8a 100644 --- a/tests/cases/compiler/sourceMapWithCaseSensitiveFileNames.ts +++ b/tests/cases/compiler/sourceMapWithCaseSensitiveFileNames.ts @@ -1,4 +1,4 @@ -// @out: tests/cases/compiler/testfiles/fooResult.js +// @out: testfiles/fooResult.js // @sourcemap: true // @useCaseSensitiveFileNames: true // @Filename: testFiles/app.ts diff --git a/tests/cases/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.ts b/tests/cases/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.ts index 17195b434e5..c96807ce1cb 100644 --- a/tests/cases/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.ts +++ b/tests/cases/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.ts @@ -1,4 +1,4 @@ -// @outDir: tests/cases/compiler/testfiles +// @outDir: testfiles // @sourcemap: true // @useCaseSensitiveFileNames: true // @Filename: testFiles/app.ts diff --git a/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNames.ts b/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNames.ts index 85905fb29b9..3528b204688 100644 --- a/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNames.ts +++ b/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNames.ts @@ -1,4 +1,4 @@ -// @out: tests/cases/compiler/testfiles/fooResult.js +// @out: testfiles/fooResult.js // @sourcemap: true // @useCaseSensitiveFileNames: false // @Filename: testFiles/app.ts diff --git a/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.ts b/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.ts index 90343b8cffc..9a4f0345d84 100644 --- a/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.ts +++ b/tests/cases/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.ts @@ -1,4 +1,4 @@ -// @outDir: tests/cases/compiler/testfiles +// @outDir: testfiles // @sourcemap: true // @useCaseSensitiveFileNames: false // @Filename: testFiles/app.ts diff --git a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts index 90a5c19196e..0bd81c58b02 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNames.ts @@ -22,4 +22,4 @@ export class BindingKey { export * from "./src/value-promise"; export * from "./src/bindingkey"; -// @link: tests/cases/compiler/monorepo/context -> tests/cases/compiler/monorepo/node_modules/@loopback/context \ No newline at end of file +// @link: monorepo/context -> monorepo/node_modules/@loopback/context \ No newline at end of file diff --git a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts index dc610c0aefb..4ff61e96360 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts @@ -20,5 +20,5 @@ export function getStyles() { return styles; } -// @link: tests/cases/compiler/Folder/node_modules/styled-components -> tests/cases/compiler/Folder/monorepo/package-a/node_modules/styled-components -// @link: tests/cases/compiler/Folder/monorepo/package-a -> tests/cases/compiler/Folder/monorepo/core/node_modules/package-a \ No newline at end of file +// @link: Folder/node_modules/styled-components -> Folder/monorepo/package-a/node_modules/styled-components +// @link: Folder/monorepo/package-a -> Folder/monorepo/core/node_modules/package-a \ No newline at end of file diff --git a/tests/cases/conformance/es6/moduleExportsAmd/outFilerootDirModuleNamesAmd.ts b/tests/cases/conformance/es6/moduleExportsAmd/outFilerootDirModuleNamesAmd.ts index ae207e8f341..ce424529573 100644 --- a/tests/cases/conformance/es6/moduleExportsAmd/outFilerootDirModuleNamesAmd.ts +++ b/tests/cases/conformance/es6/moduleExportsAmd/outFilerootDirModuleNamesAmd.ts @@ -1,6 +1,6 @@ // @target: ES6 // @module: amd -// @rootDir: tests/cases/conformance/es6/moduleExportsAmd/src +// @rootDir: src // @outFile: output.js // @filename: src/a.ts import foo from "./b"; diff --git a/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts b/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts index a301df92a17..f89592f1134 100644 --- a/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts +++ b/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts @@ -1,6 +1,6 @@ // @target: ES6 // @module: system -// @rootDir: tests/cases/conformance/es6/moduleExportsSystem/src +// @rootDir: src // @outFile: output.js // @filename: src/a.ts import foo from "./b"; diff --git a/tests/cases/conformance/references/library-reference-1.ts b/tests/cases/conformance/references/library-reference-1.ts index c6b6cea36ef..7f05c689a96 100644 --- a/tests/cases/conformance/references/library-reference-1.ts +++ b/tests/cases/conformance/references/library-reference-1.ts @@ -1,7 +1,6 @@ // @noImplicitReferences: true // @traceResolution: true -// @currentDirectory: /src -// @typeRoots: types +// @typeRoots: /src/types // We can find typings in the ./types folder diff --git a/tests/cases/conformance/references/library-reference-10.ts b/tests/cases/conformance/references/library-reference-10.ts index bc9ec99edcf..ceed5aec756 100644 --- a/tests/cases/conformance/references/library-reference-10.ts +++ b/tests/cases/conformance/references/library-reference-10.ts @@ -1,7 +1,6 @@ // @noImplicitReferences: true // @traceResolution: true -// @currentDirectory: /foo -// @typeRoots: ./types +// @typeRoots: /foo/types // package.json in a primary reference can refer to another file diff --git a/tests/cases/conformance/references/library-reference-15.ts b/tests/cases/conformance/references/library-reference-15.ts index 417012a4539..eab57cad989 100644 --- a/tests/cases/conformance/references/library-reference-15.ts +++ b/tests/cases/conformance/references/library-reference-15.ts @@ -1,8 +1,7 @@ // @noImplicitReferences: true // @traceResolution: true // @types: jquery -// @currentDirectory: /a -// @typeRoots: types +// @typeRoots: /a/types // @filename: /a/types/jquery/index.d.ts declare var $: { foo(): void };