diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml index 640ed67e8c7..2662646cc05 100644 --- a/.github/workflows/accept-baselines-fix-lints.yaml +++ b/.github/workflows/accept-baselines-fix-lints.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use node version 14 - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 370575013cb..b95b0481ed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,14 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 17.x] + node-version: [14.x, 16.x, 18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 5 - name: Use node version ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Remove existing TypeScript diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8cb8045ef42..e9bc38cbcae 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -11,6 +11,7 @@ jobs: # CodeQL runs on ubuntu-latest and windows-latest runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' steps: - name: Checkout repository diff --git a/.github/workflows/ensure-related-repos-run-crons.yml b/.github/workflows/ensure-related-repos-run-crons.yml index f6faff6b67f..a26fb5b7992 100644 --- a/.github/workflows/ensure-related-repos-run-crons.yml +++ b/.github/workflows/ensure-related-repos-run-crons.yml @@ -14,6 +14,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' steps: - name: Configure git diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 65c36525f38..90b8bbdf5ef 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -10,7 +10,7 @@ jobs: steps: - name: Use node version 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x - uses: actions/checkout@v2 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index c207c19ace2..d255a324f79 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -11,11 +11,12 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' steps: - uses: actions/checkout@v2 - name: Use node version 14 - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index 388f6415af6..17bb3be4680 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use node version 14 - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14 - name: Remove existing TypeScript diff --git a/.github/workflows/rich-navigation.yml b/.github/workflows/rich-navigation.yml index 4097f2893c3..82ba9bf54f1 100644 --- a/.github/workflows/rich-navigation.yml +++ b/.github/workflows/rich-navigation.yml @@ -19,7 +19,7 @@ jobs: with: fetch-depth: 5 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 14 diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index a3077e39e2d..5b1338daff2 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -10,7 +10,7 @@ jobs: steps: - name: Use node version 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x - uses: actions/checkout@v2 diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index a26718e6063..fae67017c61 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -15,7 +15,7 @@ jobs: steps: - name: Use node version 14.x - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14.x - uses: actions/checkout@v2 diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml index 0a8ba026ac4..36a97b49ac5 100644 --- a/.github/workflows/twoslash-repros.yaml +++ b/.github/workflows/twoslash-repros.yaml @@ -20,11 +20,11 @@ on: jobs: run: - if: ${{ !github.event.label && !github.event.inputs.bisect_issue }} + if: ${{ github.repository == 'microsoft/TypeScript' && !github.event.label && !github.event.inputs.bisect_issue }} runs-on: ubuntu-latest steps: - name: Use node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 - uses: microsoft/TypeScript-Twoslash-Repro-Action@master with: github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: 16 - uses: microsoft/TypeScript-Twoslash-Repro-Action@master diff --git a/.github/workflows/update-lkg.yml b/.github/workflows/update-lkg.yml index 4faf242f8bf..cac9c6c4c06 100644 --- a/.github/workflows/update-lkg.yml +++ b/.github/workflows/update-lkg.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use node version 14 - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: 14 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml index 3880b5cae83..1c54603f9ba 100644 --- a/.github/workflows/update-package-lock.yaml +++ b/.github/workflows/update-package-lock.yaml @@ -10,10 +10,11 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: 14 registry-url: https://registry.npmjs.org/ diff --git a/AUTHORS.md b/AUTHORS.md index b58f1a31efd..e02b495d242 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -169,6 +169,7 @@ TypeScript is authored by: - Gabriel Isenberg - Gabriela Araujo Britto - Gabriela Britto + - Gao Sheng - gb714us - Gilad Peleg - Godfrey Chan diff --git a/package-lock.json b/package-lock.json index fb73528300f..46831288f2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -626,9 +626,9 @@ } }, "@types/mocha": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.0.tgz", - "integrity": "sha512-QCWHkbMv4Y5U9oW10Uxbr45qMMSzl4OzijsozynUAgx3kEHUdXB00udx2dWDQ7f2TU2a2uuiFaRZjCe3unPpeg==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", "dev": true }, "@types/ms": { @@ -638,9 +638,9 @@ "dev": true }, "@types/node": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", - "integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==", + "version": "17.0.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz", + "integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==", "dev": true }, "@types/node-fetch": { @@ -3334,12 +3334,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "gulp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", @@ -4328,32 +4322,30 @@ "dev": true }, "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", - "debug": "4.3.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", "glob": "7.2.0", - "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "4.2.1", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.1", + "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -4430,9 +4422,9 @@ } }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -4570,12 +4562,23 @@ } }, "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "p-limit": { @@ -4651,15 +4654,6 @@ "is-number": "^7.0.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4726,9 +4720,9 @@ "optional": true }, "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "nanomatch": { @@ -6685,9 +6679,9 @@ "dev": true }, "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { diff --git a/scripts/build/tests.js b/scripts/build/tests.js index 10c6db79cf1..84cd23bfc10 100644 --- a/scripts/build/tests.js +++ b/scripts/build/tests.js @@ -122,7 +122,9 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode, try { setNodeEnvToDevelopment(); - const { exitCode } = await exec("node", args, { cancelToken }); + const { exitCode } = await exec(process.execPath, args, { + cancelToken, + }); if (exitCode !== 0) { errorStatus = exitCode; error = new Error(`Process exited with status code ${errorStatus}.`); diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 9d4ce0595eb..0485f10cbf0 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -161,6 +161,8 @@ namespace ts { * true if program has been emitted */ programEmitComplete?: true; + /** Stores list of files that change signature during emit - test only */ + filesChangingSignature?: Set; } function hasSameKeys(map1: ReadonlyCollection | undefined, map2: ReadonlyCollection | undefined): boolean { @@ -434,25 +436,35 @@ namespace ts { return undefined; } + function removeDiagnosticsOfLibraryFiles(state: BuilderProgramState) { + if (!state.cleanedDiagnosticsOfLibFiles) { + state.cleanedDiagnosticsOfLibFiles = true; + const program = Debug.checkDefined(state.program); + const options = program.getCompilerOptions(); + forEach(program.getSourceFiles(), f => + program.isSourceFileDefaultLibrary(f) && + !skipTypeChecking(f, options, program) && + removeSemanticDiagnosticsOf(state, f.resolvedPath) + ); + } + } + /** * Handles semantic diagnostics and dts emit for affectedFile and files, that are referencing modules that export entities from affected file * This is because even though js emit doesnt change, dts emit / type used can change resulting in need for dts emit and js change */ - function handleDtsMayChangeOfAffectedFile(state: BuilderProgramState, affectedFile: SourceFile, cancellationToken: CancellationToken | undefined, computeHash: BuilderState.ComputeHash, host: BuilderProgramHost) { + function handleDtsMayChangeOfAffectedFile( + state: BuilderProgramState, + affectedFile: SourceFile, + cancellationToken: CancellationToken | undefined, + computeHash: BuilderState.ComputeHash, + host: BuilderProgramHost, + ) { removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath); // If affected files is everything except default library, then nothing more to do if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { - if (!state.cleanedDiagnosticsOfLibFiles) { - state.cleanedDiagnosticsOfLibFiles = true; - const program = Debug.checkDefined(state.program); - const options = program.getCompilerOptions(); - forEach(program.getSourceFiles(), f => - program.isSourceFileDefaultLibrary(f) && - !skipTypeChecking(f, options, program) && - removeSemanticDiagnosticsOf(state, f.resolvedPath) - ); - } + removeDiagnosticsOfLibraryFiles(state); // When a change affects the global scope, all files are considered to be affected without updating their signature // That means when affected file is handled, its signature can be out of date // To avoid this, ensure that we update the signature for any affected file in this scenario. @@ -467,20 +479,22 @@ namespace ts { ); return; } - else { - Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || state.currentAffectedFilesSignatures?.has(affectedFile.resolvedPath), `Signature not updated for affected file: ${affectedFile.fileName}`); - } - - if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) { - forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, (state, path) => handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host)); - } + Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || state.currentAffectedFilesSignatures?.has(affectedFile.resolvedPath), `Signature not updated for affected file: ${affectedFile.fileName}`); + if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) return; + handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host); } /** * Handle the dts may change, so they need to be added to pending emit if dts emit is enabled, * Also we need to make sure signature is updated for these files */ - function handleDtsMayChangeOf(state: BuilderProgramState, path: Path, cancellationToken: CancellationToken | undefined, computeHash: BuilderState.ComputeHash, host: BuilderProgramHost): void { + function handleDtsMayChangeOf( + state: BuilderProgramState, + path: Path, + cancellationToken: CancellationToken | undefined, + computeHash: BuilderState.ComputeHash, + host: BuilderProgramHost + ): void { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { @@ -529,16 +543,61 @@ namespace ts { return newSignature !== oldSignature; } + function forEachKeyOfExportedModulesMap( + state: BuilderProgramState, + filePath: Path, + fn: (exportedFromPath: Path) => T | undefined, + ): T | undefined { + // Go through exported modules from cache first + let keys = state.currentAffectedFilesExportedModulesMap!.getKeys(filePath); + const result = keys && forEachKey(keys, fn); + if (result) return result; + + // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected + keys = state.exportedModulesMap!.getKeys(filePath); + return keys && forEachKey(keys, exportedFromPath => + // If the cache had an updated value, skip + !state.currentAffectedFilesExportedModulesMap!.hasKey(exportedFromPath) && + !state.currentAffectedFilesExportedModulesMap!.deletedKeys()?.has(exportedFromPath) ? + fn(exportedFromPath) : + undefined + ); + } + + function handleDtsMayChangeOfGlobalScope( + state: BuilderProgramState, + filePath: Path, + cancellationToken: CancellationToken | undefined, + computeHash: BuilderState.ComputeHash, + host: BuilderProgramHost, + ): boolean { + if (!state.fileInfos.get(filePath)?.affectsGlobalScope) return false; + // Every file needs to be handled + BuilderState.getAllFilesExcludingDefaultLibraryFile(state, state.program!, /*firstSourceFile*/ undefined) + .forEach(file => handleDtsMayChangeOf( + state, + file.resolvedPath, + cancellationToken, + computeHash, + host, + )); + removeDiagnosticsOfLibraryFiles(state); + return true; + } + /** - * Iterate on referencing modules that export entities from affected file + * Iterate on referencing modules that export entities from affected file and delete diagnostics and add pending emit */ - function forEachReferencingModulesOfExportOfAffectedFile(state: BuilderProgramState, affectedFile: SourceFile, fn: (state: BuilderProgramState, filePath: Path) => void) { + function handleDtsMayChangeOfReferencingExportOfAffectedFile( + state: BuilderProgramState, + affectedFile: SourceFile, + cancellationToken: CancellationToken | undefined, + computeHash: BuilderState.ComputeHash, + host: BuilderProgramHost + ) { // If there was change in signature (dts output) for the changed file, // then only we need to handle pending file emit - if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) { - return; - } - + if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) return; if (!isChangedSignature(state, affectedFile.resolvedPath)) return; // Since isolated modules dont change js files, files affected by change in signature is itself @@ -551,7 +610,8 @@ namespace ts { const currentPath = queue.pop()!; if (!seenFileNamesMap.has(currentPath)) { seenFileNamesMap.set(currentPath, true); - fn(state, currentPath); + if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken, computeHash, host)) return; + handleDtsMayChangeOf(state, currentPath, cancellationToken, computeHash, host); if (isChangedSignature(state, currentPath)) { const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath)!; queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); @@ -561,65 +621,69 @@ namespace ts { } Debug.assert(!!state.currentAffectedFilesExportedModulesMap); - const seenFileAndExportsOfFile = new Set(); // Go through exported modules from cache first // If exported modules has path, all files referencing file exported from are affected - state.currentAffectedFilesExportedModulesMap.getKeys(affectedFile.resolvedPath)?.forEach(exportedFromPath => - forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn) - ); - - // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected - state.exportedModulesMap.getKeys(affectedFile.resolvedPath)?.forEach(exportedFromPath => - // If the cache had an updated value, skip - !state.currentAffectedFilesExportedModulesMap!.hasKey(exportedFromPath) && - !state.currentAffectedFilesExportedModulesMap!.deletedKeys()?.has(exportedFromPath) && - forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn) - ); + forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, exportedFromPath => { + if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host)) return true; + const references = state.referencedMap!.getKeys(exportedFromPath); + return references && forEachKey(references, filePath => + handleDtsMayChangeOfFileAndExportsOfFile( + state, + filePath, + seenFileAndExportsOfFile, + cancellationToken, + computeHash, + host, + ) + ); + }); } /** - * Iterate on files referencing referencedPath + * handle dts and semantic diagnostics on file and iterate on anything that exports this file + * return true when all work is done and we can exit handling dts emit and semantic diagnostics */ - function forEachFilesReferencingPath(state: BuilderProgramState, referencedPath: Path, seenFileAndExportsOfFile: Set, fn: (state: BuilderProgramState, filePath: Path) => void): void { - state.referencedMap!.getKeys(referencedPath)?.forEach(filePath => - forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn) - ); - } - - /** - * fn on file and iterate on anything that exports this file - */ - function forEachFileAndExportsOfFile(state: BuilderProgramState, filePath: Path, seenFileAndExportsOfFile: Set, fn: (state: BuilderProgramState, filePath: Path) => void): void { - if (!tryAddToSet(seenFileAndExportsOfFile, filePath)) { - return; - } - - fn(state, filePath); + function handleDtsMayChangeOfFileAndExportsOfFile( + state: BuilderProgramState, + filePath: Path, + seenFileAndExportsOfFile: Set, + cancellationToken: CancellationToken | undefined, + computeHash: BuilderState.ComputeHash, + host: BuilderProgramHost, + ): boolean | undefined { + if (!tryAddToSet(seenFileAndExportsOfFile, filePath)) return undefined; + if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host)) return true; + handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host); Debug.assert(!!state.currentAffectedFilesExportedModulesMap); - // Go through exported modules from cache first - // If exported modules has path, all files referencing file exported from are affected - state.currentAffectedFilesExportedModulesMap.getKeys(filePath)?.forEach(exportedFromPath => - forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn) - ); - // If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected - state.exportedModulesMap!.getKeys(filePath)?.forEach(exportedFromPath => - // If the cache had an updated value, skip - !state.currentAffectedFilesExportedModulesMap!.hasKey(exportedFromPath) && - !state.currentAffectedFilesExportedModulesMap!.deletedKeys()?.has(exportedFromPath) && - forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn) + // If exported modules has path, all files referencing file exported from are affected + forEachKeyOfExportedModulesMap(state, filePath, exportedFromPath => + handleDtsMayChangeOfFileAndExportsOfFile( + state, + exportedFromPath, + seenFileAndExportsOfFile, + cancellationToken, + computeHash, + host, + ) ); // Remove diagnostics of files that import this file (without going to exports of referencing files) state.referencedMap!.getKeys(filePath)?.forEach(referencingFilePath => !seenFileAndExportsOfFile.has(referencingFilePath) && // Not already removed diagnostic file - fn(state, referencingFilePath) // Dont add to seen since this is not yet done with the export removal + handleDtsMayChangeOf( // Dont add to seen since this is not yet done with the export removal + state, + referencingFilePath, + cancellationToken, + computeHash, + host, + ) ); + return undefined; } - /** * This is called after completing operation on the next affected file. * The operations here are postponed to ensure that cancellation during the iteration is handled correctly @@ -1088,7 +1152,9 @@ namespace ts { // Otherwise just affected file Debug.checkDefined(state.program).emit( affected === state.program ? undefined : affected as SourceFile, - writeFile || maybeBind(host, host.writeFile), + affected !== state.program && getEmitDeclarations(state.compilerOptions) && !customTransformers ? + getWriteFileUpdatingSignatureCallback(writeFile) : + writeFile || maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === BuilderFileEmit.DtsOnly, customTransformers @@ -1099,6 +1165,34 @@ namespace ts { ); } + function getWriteFileUpdatingSignatureCallback(writeFile: WriteFileCallback | undefined): WriteFileCallback { + return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => { + if (isDeclarationFileName(fileName)) { + Debug.assert(sourceFiles?.length === 1); + const file = sourceFiles[0]; + const info = state.fileInfos.get(file.resolvedPath)!; + const signature = state.currentAffectedFilesSignatures?.get(file.resolvedPath) || info.signature; + if (signature === file.version) { + const newSignature = (computeHash || generateDjb2Hash)(data?.sourceMapUrlPos !== undefined ? text.substring(0, data.sourceMapUrlPos) : text); + if (newSignature !== file.version) { // Update it + if (host.storeFilesChangingSignatureDuringEmit) (state.filesChangingSignature ||= new Set()).add(file.resolvedPath); + if (state.exportedModulesMap) BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap ||= BuilderState.createManyToManyPathMap()); + if (state.affectedFiles && state.affectedFilesIndex! < state.affectedFiles.length) { + state.currentAffectedFilesSignatures!.set(file.resolvedPath, newSignature); + } + else { + info.signature = newSignature; + if (state.exportedModulesMap) BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap); + } + } + } + } + if (writeFile) writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); + else if (host.writeFile) host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); + else state.program!.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); + }; + } + /** * Emits the JavaScript and declaration files. * When targetSource file is specified, emits the files corresponding to that source file, @@ -1153,7 +1247,15 @@ namespace ts { } } } - return Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers); + return Debug.checkDefined(state.program).emit( + targetSourceFile, + !outFile(state.compilerOptions) && getEmitDeclarations(state.compilerOptions) && !customTransformers ? + getWriteFileUpdatingSignatureCallback(writeFile) : + writeFile || maybeBind(host, host.writeFile), + cancellationToken, + emitOnlyDtsFiles, + customTransformers + ); } /** diff --git a/src/compiler/builderPublic.ts b/src/compiler/builderPublic.ts index 5d5d2ed25dd..a3527a83f9f 100644 --- a/src/compiler/builderPublic.ts +++ b/src/compiler/builderPublic.ts @@ -20,6 +20,11 @@ namespace ts { */ /*@internal*/ disableUseFileVersionAsSignature?: boolean; + /** + * Store the list of files that update signature during the emit + */ + /*@internal*/ + storeFilesChangingSignatureDuringEmit?: boolean; } /** diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index d78a107472c..f501eda66a1 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -450,7 +450,7 @@ namespace ts { /** * Coverts the declaration emit result into exported modules map */ - function updateExportedModules(sourceFile: SourceFile, exportedModulesFromDeclarationEmit: ExportedModulesFromDeclarationEmit | undefined, exportedModulesMapCache: ManyToManyPathMap) { + export function updateExportedModules(sourceFile: SourceFile, exportedModulesFromDeclarationEmit: ExportedModulesFromDeclarationEmit | undefined, exportedModulesMapCache: ManyToManyPathMap) { if (!exportedModulesFromDeclarationEmit) { exportedModulesMapCache.deleteKey(sourceFile.resolvedPath); return; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7a75d6e925f..ae1ded9d0d8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -833,6 +833,7 @@ namespace ts { const keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType; const numberOrBigIntType = getUnionType([numberType, bigintType]); const templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]) as UnionType; + const numericStringType = getTemplateLiteralType(["", ""], [numberType]); // The `${number}` type const restrictiveMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? getRestrictiveTypeParameter(t as TypeParameter) : t); const permissiveMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? wildcardType : t); @@ -1047,7 +1048,7 @@ namespace ts { const builtinGlobals = createSymbolTable(); builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol); - // Extensions suggested for path imports when module resolution is node12 or higher. + // Extensions suggested for path imports when module resolution is node16 or higher. // The first element of each tuple is the extension a file has. // The second element of each tuple is the extension that should be used in a path import. // e.g. if we want to import file `foo.mts`, we should write `import {} from "./foo.mjs". @@ -3527,7 +3528,7 @@ namespace ts { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { errorOnImplicitAnyModule(/*isError*/ false, errorNode, resolvedModule, moduleReference); } - if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node12 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { + if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { const isSyncImport = (currentSourceFile.impliedNodeFormat === ModuleKind.CommonJS && !findAncestor(location, isImportCall)) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, l => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)) as ImportTypeNode | ImportDeclaration | ExportDeclaration | undefined; const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? overrideClauseHost.assertions?.assertClause : overrideClauseHost?.assertClause; @@ -3536,9 +3537,6 @@ namespace ts { if (isSyncImport && sourceFile.impliedNodeFormat === ModuleKind.ESNext && !getResolutionModeOverrideForClause(overrideClause)) { error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference); } - if (mode === ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === Extension.Json) { - error(errorNode, Diagnostics.JSON_imports_are_experimental_in_ES_module_mode_imports); - } } // merged symbol is module declaration symbol combined with all augmentations return getMergedSymbol(sourceFile.symbol); @@ -3595,7 +3593,7 @@ namespace ts { const tsExtension = tryExtractTSExtension(moduleReference); const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference); const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolutionIsNode12OrNext = moduleResolutionKind === ModuleResolutionKind.Node12 || + const resolutionIsNode16OrNext = moduleResolutionKind === ModuleResolutionKind.Node16 || moduleResolutionKind === ModuleResolutionKind.NodeNext; if (tsExtension) { const diag = Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; @@ -3616,16 +3614,16 @@ namespace ts { hasJsonModuleEmitEnabled(compilerOptions)) { error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } - else if (mode === ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) { + else if (mode === ModuleKind.ESNext && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); const suggestedExt = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))?.[1]; if (suggestedExt) { error(errorNode, - Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0, + Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt); } else { - error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { @@ -4109,7 +4107,7 @@ namespace ts { function getExportSymbolOfValueSymbolIfExported(symbol: Symbol): Symbol; function getExportSymbolOfValueSymbolIfExported(symbol: Symbol | undefined): Symbol | undefined; function getExportSymbolOfValueSymbolIfExported(symbol: Symbol | undefined): Symbol | undefined { - return getMergedSymbol(symbol && (symbol.flags & SymbolFlags.ExportValue) !== 0 ? symbol.exportSymbol : symbol); + return getMergedSymbol(symbol && (symbol.flags & SymbolFlags.ExportValue) !== 0 && symbol.exportSymbol || symbol); } function symbolIsValue(symbol: Symbol): boolean { @@ -6190,7 +6188,7 @@ namespace ts { const targetFile = getSourceFileOfModule(chain[0]); let specifier: string | undefined; let assertion: ImportTypeAssertionContainer | undefined; - if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node12 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { + if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { // An `import` type directed at an esm format file is only going to resolve in esm mode - set the esm mode assertion if (targetFile?.impliedNodeFormat === ModuleKind.ESNext && targetFile.impliedNodeFormat !== contextFile?.impliedNodeFormat) { specifier = getSpecifierForModuleSymbol(chain[0], context, ModuleKind.ESNext); @@ -6207,7 +6205,7 @@ namespace ts { } if (!(context.flags & NodeBuilderFlags.AllowNodeModulesRelativePaths) && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) { const oldSpecifier = specifier; - if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node12 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { + if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) { // We might be able to write a portable import type using a mode override; try specifier generation again, but with a different mode set const swappedMode = contextFile?.impliedNodeFormat === ModuleKind.ESNext ? ModuleKind.CommonJS : ModuleKind.ESNext; specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode); @@ -11506,7 +11504,7 @@ namespace ts { if (symbol === globalThisSymbol) { const varsOnly = new Map() as SymbolTable; members.forEach(p => { - if (!(p.flags & SymbolFlags.BlockScoped)) { + if (!(p.flags & SymbolFlags.BlockScoped) && !(p.flags & SymbolFlags.ValueModule && p.declarations?.length && every(p.declarations, isAmbientModule))) { varsOnly.set(p.escapedName, p); } }); @@ -12273,7 +12271,7 @@ namespace ts { const typeVariable = getHomomorphicTypeVariable(type); if (typeVariable && !type.declaration.nameType) { const constraint = getConstraintOfTypeParameter(typeVariable); - if (constraint && (isArrayType(constraint) || isTupleType(constraint))) { + if (constraint && isArrayOrTupleType(constraint)) { return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper)); } } @@ -12654,10 +12652,10 @@ namespace ts { function isApplicableIndexType(source: Type, target: Type): boolean { // A 'string' index signature applies to types assignable to 'string' or 'number', and a 'number' index - // signature applies to types assignable to 'number' and numeric string literal types. + // signature applies to types assignable to 'number', `${number}` and numeric string literal types. return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || - target === numberType && !!(source.flags & TypeFlags.StringLiteral) && isNumericLiteralName((source as StringLiteralType).value); + target === numberType && (source === numericStringType || !!(source.flags & TypeFlags.StringLiteral) && isNumericLiteralName((source as StringLiteralType).value)); } function getIndexInfosOfStructuredType(type: Type): readonly IndexInfo[] { @@ -13778,6 +13776,20 @@ namespace ts { constraints = append(constraints, constraint); } } + // Given a homomorphic mapped type { [K in keyof T]: XXX }, where T is constrained to an array or tuple type, in the + // template type XXX, K has an added constraint of number | `${number}`. + else if (type.flags & TypeFlags.TypeParameter && parent.kind === SyntaxKind.MappedType && node === (parent as MappedTypeNode).type) { + const mappedType = getTypeFromTypeNode(parent as TypeNode) as MappedType; + if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { + const typeParameter = getHomomorphicTypeVariable(mappedType); + if (typeParameter) { + const constraint = getConstraintOfTypeParameter(typeParameter); + if (constraint && everyType(constraint, isArrayOrTupleType)) { + constraints = append(constraints, getUnionType([numberType, numericStringType])); + } + } + } + } node = parent; } return constraints ? getSubstitutionType(type, getIntersectionType(append(constraints, type))) : type; @@ -14817,7 +14829,7 @@ namespace ts { i--; const t = types[i]; const remove = - t.flags & TypeFlags.String && includes & TypeFlags.StringLiteral || + t.flags & TypeFlags.String && includes & (TypeFlags.StringLiteral | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) || t.flags & TypeFlags.Number && includes & TypeFlags.NumberLiteral || t.flags & TypeFlags.BigInt && includes & TypeFlags.BigIntLiteral || t.flags & TypeFlags.ESSymbol && includes & TypeFlags.UniqueESSymbol; @@ -14978,7 +14990,7 @@ namespace ts { if (!strictNullChecks && includes & TypeFlags.Nullable) { return includes & TypeFlags.Undefined ? undefinedType : nullType; } - if (includes & TypeFlags.String && includes & TypeFlags.StringLiteral || + if (includes & TypeFlags.String && includes & (TypeFlags.StringLiteral | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) || includes & TypeFlags.Number && includes & TypeFlags.NumberLiteral || includes & TypeFlags.BigInt && includes & TypeFlags.BigIntLiteral || includes & TypeFlags.ESSymbol && includes & TypeFlags.UniqueESSymbol) { @@ -15737,11 +15749,14 @@ namespace ts { return type[cache] = elementType; } } - // If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper - // that substitutes the index type for P. For example, for an index access { [P in K]: Box }[X], we - // construct the type Box. - if (isGenericMappedType(objectType) && !objectType.declaration.nameType) { - return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), t => getSimplifiedType(t, writing)); + // If the object type is a mapped type { [P in K]: E }, where K is generic, or { [P in K as N]: E }, where + // K is generic and N is assignable to P, instantiate E using a mapper that substitutes the index type for P. + // For example, for an index access { [P in K]: Box }[X], we construct the type Box. + if (isGenericMappedType(objectType)) { + const nameType = getNameTypeFromMappedType(objectType); + if (!nameType || isTypeAssignableTo(nameType, getTypeParameterFromMappedType(objectType))) { + return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), t => getSimplifiedType(t, writing)); + } } return type[cache] = type; } @@ -16993,7 +17008,7 @@ namespace ts { if (!type.declaration.nameType) { let constraint; if (isArrayType(t) || t.flags & TypeFlags.Any && findResolutionCycleStartIndex(typeVariable, TypeSystemPropertyName.ImmediateBaseConstraint) < 0 && - (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, or(isArrayType, isTupleType))) { + (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); } if (isGenericTupleType(t)) { @@ -18562,7 +18577,7 @@ namespace ts { } return false; } - return isTupleType(target) || isArrayType(target); + return isArrayOrTupleType(target); } if (isReadonlyArrayType(source) && isMutableArrayOrTuple(target)) { if (reportErrors) { @@ -18697,7 +18712,7 @@ namespace ts { // recursive intersections that are structurally similar but not exactly identical. See #37854. if (result && !inPropertyCheck && ( target.flags & TypeFlags.Intersection && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) || - isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & TypeFlags.Intersection && getApparentType(source).flags & TypeFlags.StructuredType && !some((source as IntersectionType).types, t => !!(getObjectFlags(t) & ObjectFlags.NonInferrableType)))) { + isNonGenericObjectType(target) && !isArrayOrTupleType(target) && source.flags & TypeFlags.Intersection && getApparentType(source).flags & TypeFlags.StructuredType && !some((source as IntersectionType).types, t => !!(getObjectFlags(t) & ObjectFlags.NonInferrableType)))) { inPropertyCheck = true; result &= recursiveTypeRelatedTo(source, target, reportErrors, IntersectionState.PropertyCheck, recursionFlags); inPropertyCheck = false; @@ -18754,9 +18769,6 @@ namespace ts { return; } reportRelationError(headMessage, source, target); - if (strictNullChecks && source.flags & TypeFlags.TypeVariable && source.symbol?.declarations?.[0] && !getConstraintOfType(source as TypeVariable) && isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~TypeFlags.NonPrimitive))) { - associateRelatedInfo(createDiagnosticForNode(source.symbol.declarations[0], Diagnostics.This_type_parameter_probably_needs_an_extends_object_constraint)); - } } function traceUnionsOrIntersectionsTooLarge(source: Type, target: Type): void { @@ -19547,7 +19559,7 @@ namespace ts { // IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch if (!(sourceFlags & TypeFlags.IndexedAccess && targetFlags & TypeFlags.IndexedAccess)) { const constraint = getConstraintOfType(source as TypeVariable); - if (!strictNullChecks && (!constraint || (sourceFlags & TypeFlags.TypeParameter && constraint.flags & TypeFlags.Any))) { + if (!constraint || (sourceFlags & TypeFlags.TypeParameter && constraint.flags & TypeFlags.Any)) { // A type variable with no constraint is not related to the non-primitive object type. if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~TypeFlags.NonPrimitive), RecursionFlags.Both)) { resetErrorInfo(saveErrorInfo); @@ -19555,12 +19567,12 @@ namespace ts { } } // hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed - else if (constraint && (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState))) { + else if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) { resetErrorInfo(saveErrorInfo); return result; } // slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example - else if (constraint && (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, RecursionFlags.Source, reportErrors && !(targetFlags & sourceFlags & TypeFlags.TypeParameter), /*headMessage*/ undefined, intersectionState))) { + else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, RecursionFlags.Source, reportErrors && !(targetFlags & sourceFlags & TypeFlags.TypeParameter), /*headMessage*/ undefined, intersectionState)) { resetErrorInfo(saveErrorInfo); return result; } @@ -19705,7 +19717,7 @@ namespace ts { return varianceResult; } } - else if (isReadonlyArrayType(target) ? isArrayType(source) || isTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) { + else if (isReadonlyArrayType(target) ? isArrayOrTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) { if (relation !== identityRelation) { return isRelatedTo(getIndexTypeOfType(source, numberType) || anyType, getIndexTypeOfType(target, numberType) || anyType, RecursionFlags.Both, reportErrors); } @@ -20090,7 +20102,7 @@ namespace ts { } let result = Ternary.True; if (isTupleType(target)) { - if (isArrayType(source) || isTupleType(source)) { + if (isArrayOrTupleType(source)) { if (!target.target.readonly && (isReadonlyArrayType(source) || isTupleType(source) && source.target.readonly)) { return Ternary.False; } @@ -21095,6 +21107,10 @@ namespace ts { return !!(getObjectFlags(type) & ObjectFlags.Reference) && (type as TypeReference).target === globalReadonlyArrayType; } + function isArrayOrTupleType(type: Type): type is TypeReference { + return isArrayType(type) || isTupleType(type); + } + function isMutableArrayOrTuple(type: Type): boolean { return isArrayType(type) && !isReadonlyArrayType(type) || isTupleType(type) && !type.target.readonly; } @@ -21595,7 +21611,7 @@ namespace ts { else if (type.flags & TypeFlags.Intersection) { result = getIntersectionType(sameMap((type as IntersectionType).types, getWidenedType)); } - else if (isArrayType(type) || isTupleType(type)) { + else if (isArrayOrTupleType(type)) { result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType)); } if (result && context === undefined) { @@ -21632,7 +21648,7 @@ namespace ts { } } } - if (isArrayType(type) || isTupleType(type)) { + if (isArrayOrTupleType(type)) { for (const t of getTypeArguments(type)) { if (reportWideningErrorsInType(t)) { errorReported = true; @@ -22711,7 +22727,7 @@ namespace ts { } // Infer from the members of source and target only if the two types are possibly related if (!typesDefinitelyUnrelated(source, target)) { - if (isArrayType(source) || isTupleType(source)) { + if (isArrayOrTupleType(source)) { if (isTupleType(target)) { const sourceArity = getTypeReferenceArity(source); const targetArity = getTypeReferenceArity(target); @@ -25509,7 +25525,7 @@ namespace ts { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent = declaration.parent.parent; if (parent.kind === SyntaxKind.VariableDeclaration && getCombinedNodeFlags(declaration) & NodeFlags.Const || parent.kind === SyntaxKind.Parameter) { - const links = getNodeLinks(location); + const links = getNodeLinks(parent); if (!(links.flags & NodeCheckFlags.InCheckIdentifier)) { links.flags |= NodeCheckFlags.InCheckIdentifier; const parentType = getTypeForBindingElementParent(parent, CheckMode.Normal); @@ -27983,6 +27999,7 @@ namespace ts { } } else { + error(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; } } @@ -28943,10 +28960,17 @@ namespace ts { prop = getPropertyOfType(apparentType, right.escapedText); } // In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums. + // `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined + // here even if `Foo` is not a const enum. + // // The exceptions are: // 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and // 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`. - if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && isConstEnumOrConstEnumOnlyModule(prop)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && ( + compilerOptions.isolatedModules || + !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & SymbolFlags.EnumMember && node.parent.kind === SyntaxKind.EnumMember)) || + shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node) + )) { markAliasReferenced(parentSymbol, node); } @@ -30383,9 +30407,15 @@ namespace ts { const parameterRange = hasRestParameter ? min : min < max ? min + "-" + max : min; - const error = hasRestParameter ? Diagnostics.Expected_at_least_0_arguments_but_got_1 - : parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node) ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise - : Diagnostics.Expected_0_arguments_but_got_1; + const isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node); + if (isVoidPromiseError && isInJSFile(node)) { + return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); + } + const error = hasRestParameter + ? Diagnostics.Expected_at_least_0_arguments_but_got_1 + : isVoidPromiseError + ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise + : Diagnostics.Expected_0_arguments_but_got_1; if (min < args.length && args.length < max) { // between min and max, but with no matching overload return getDiagnosticForCallNode(node, Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove); @@ -30490,6 +30520,7 @@ namespace ts { // decorators are applied to a declaration by the emitter, and not to an expression. const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? CheckMode.SkipContextSensitive : CheckMode.Normal; + argCheckMode |= checkMode & CheckMode.IsForStringLiteralArgumentCompletions; // The following variables are captured and modified by calls to chooseOverload. // If overload resolution or type argument inference fails, we want to report the @@ -30715,7 +30746,7 @@ namespace ts { // If one or more context sensitive arguments were excluded, we start including // them now (and keeping do so for any subsequent candidates) and perform a second // round of type inference and applicability checking for this particular candidate. - argCheckMode = CheckMode.Normal; + argCheckMode = checkMode & CheckMode.IsForStringLiteralArgumentCompletions; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters); @@ -32023,13 +32054,13 @@ namespace ts { } function checkImportMetaProperty(node: MetaProperty) { - if (moduleKind === ModuleKind.Node12 || moduleKind === ModuleKind.NodeNext) { + if (moduleKind === ModuleKind.Node16 || moduleKind === ModuleKind.NodeNext) { if (getSourceFileOfNode(node).impliedNodeFormat !== ModuleKind.ESNext) { error(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); } } else if (moduleKind < ModuleKind.ES2020 && moduleKind !== ModuleKind.System) { - error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext); + error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); } const file = getSourceFileOfNode(node); Debug.assert(!!(file.flags & NodeFlags.PossiblyContainsImportMeta), "Containing file is missing import meta node flag."); @@ -33059,16 +33090,37 @@ namespace ts { if (!hasParseDiagnostics(sourceFile)) { let span: TextSpan | undefined; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - if (!span) span = getSpanOfTokenAtPosition(sourceFile, node.pos); + span ??= getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module); diagnostics.add(diagnostic); } - if ((moduleKind !== ModuleKind.ES2022 && moduleKind !== ModuleKind.ESNext && moduleKind !== ModuleKind.System && !(moduleKind === ModuleKind.NodeNext && getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.ESNext)) || languageVersion < ScriptTarget.ES2017) { - span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher); - diagnostics.add(diagnostic); + switch (moduleKind) { + case ModuleKind.Node16: + case ModuleKind.NodeNext: + if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) { + span ??= getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add( + createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ); + break; + } + // fallthrough + case ModuleKind.ES2022: + case ModuleKind.ESNext: + case ModuleKind.System: + if (languageVersion >= ScriptTarget.ES2017) { + break; + } + // fallthrough + default: + span ??= getSpanOfTokenAtPosition(sourceFile, node.pos); + diagnostics.add( + createFileDiagnostic(sourceFile, span.start, span.length, + Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher + ) + ); + break; } } } @@ -35772,8 +35824,8 @@ namespace ts { if (node.assertions) { const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode); if (override) { - if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node12 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext); + if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) { + grammarErrorOnNode(node.assertions.assertClause, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext); } } } @@ -37391,7 +37443,7 @@ namespace ts { function checkCollisionWithRequireExportsInGeneratedCode(node: Node, name: Identifier | undefined) { // No need to check for require or exports for ES6 modules and later - if (moduleKind >= ModuleKind.ES2015 && !(moduleKind >= ModuleKind.Node12 && getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS)) { + if (moduleKind >= ModuleKind.ES2015 && !(moduleKind >= ModuleKind.Node16 && getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS)) { return; } @@ -38213,7 +38265,7 @@ namespace ts { return (use & IterationUse.PossiblyOutOfBounds) ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType; - function getIterationDiagnosticDetails(allowsStrings: boolean, downlevelIteration: boolean | undefined): [DiagnosticMessage, boolean] { + function getIterationDiagnosticDetails(allowsStrings: boolean, downlevelIteration: boolean | undefined): [error: DiagnosticMessage, maybeMissingAwait: boolean] { if (downlevelIteration) { return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] @@ -38223,7 +38275,7 @@ namespace ts { const yieldType = getIterationTypeOfIterable(use, IterationTypeKind.Yield, inputType, /*errorNode*/ undefined); if (yieldType) { - return [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false]; + return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false]; } if (isES2015OrLaterIterable(inputType.symbol?.escapedName)) { @@ -40221,7 +40273,7 @@ namespace ts { function isConstantMemberAccess(node: Expression): node is AccessExpression { const type = getTypeOfExpression(node); - if(type === errorType) { + if (type === errorType) { return false; } @@ -40666,8 +40718,8 @@ namespace ts { const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration); const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined); if (validForTypeAssertions && override) { - if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node12 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext); + if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) { + return grammarErrorOnNode(declaration.assertClause, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext); } return; // Other grammar checks do not apply to type-only imports with resolution mode assertions } @@ -41861,7 +41913,7 @@ namespace ts { const symbol = getIntrinsicTagSymbol(name.parent as JsxOpeningLikeElement); return symbol === unknownSymbol ? undefined : symbol; } - const result = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ !isJSDoc, getHostSignatureFromJSDoc(name)); + const result = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /* dontResolveAlias */ true, getHostSignatureFromJSDoc(name)); if (!result && isJSDoc) { const container = findAncestor(name, or(isClassLike, isInterfaceDeclaration)); if (container) { @@ -41972,15 +42024,20 @@ namespace ts { return propertyDeclaration; } } - else if (isMetaProperty(parent)) { - const parentType = getTypeOfNode(parent); - const propertyDeclaration = getPropertyOfType(parentType, (node as Identifier).escapedText); - if (propertyDeclaration) { - return propertyDeclaration; - } - if (parent.keywordToken === SyntaxKind.NewKeyword) { + else if (isMetaProperty(parent) && parent.name === node) { + if (parent.keywordToken === SyntaxKind.NewKeyword && idText(node as Identifier) === "target") { + // `target` in `new.target` return checkNewTargetMetaProperty(parent).symbol; } + // The `meta` in `import.meta` could be given `getTypeOfNode(parent).symbol` (the `ImportMeta` interface symbol), but + // we have a fake expression type made for other reasons already, whose transient `meta` + // member should more exactly be the kind of (declarationless) symbol we want. + // (See #44364 and #45031 for relevant implementation PRs) + if (parent.keywordToken === SyntaxKind.ImportKeyword && idText(node as Identifier) === "meta") { + return getGlobalImportMetaExpressionType().members!.get("meta" as __String); + } + // no other meta properties are valid syntax, thus no others should have symbols + return undefined; } } @@ -42141,7 +42198,7 @@ namespace ts { if (isDeclaration(node)) { // In this case, we call getSymbolOfNode instead of getSymbolAtLocation because it is a declaration const symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); + return symbol ? getTypeOfSymbol(symbol) : errorType; } if (isDeclarationNameOrImportPropertyName(node)) { @@ -43859,6 +43916,9 @@ namespace ts { } function checkGrammarExpressionWithTypeArguments(node: ExpressionWithTypeArguments | TypeQueryNode) { + if (isExpressionWithTypeArguments(node) && isImportKeyword(node.expression) && node.typeArguments) { + return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); + } return checkGrammarTypeArguments(node, node.typeArguments); } @@ -44131,9 +44191,30 @@ namespace ts { diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)); } - if ((moduleKind !== ModuleKind.ES2022 && moduleKind !== ModuleKind.ESNext && moduleKind !== ModuleKind.System && !(moduleKind === ModuleKind.NodeNext && getSourceFileOfNode(forInOrOfStatement).impliedNodeFormat === ModuleKind.ESNext)) || languageVersion < ScriptTarget.ES2017) { - diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher)); + switch (moduleKind) { + case ModuleKind.Node16: + case ModuleKind.NodeNext: + if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) { + diagnostics.add( + createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ); + break; + } + // fallthrough + case ModuleKind.ES2022: + case ModuleKind.ESNext: + case ModuleKind.System: + if (languageVersion >= ScriptTarget.ES2017) { + break; + } + // fallthrough + default: + diagnostics.add( + createDiagnosticForNode(forInOrOfStatement.awaitModifier, + Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher + ) + ); + break; } } } @@ -44905,11 +44986,11 @@ namespace ts { function checkGrammarImportCallExpression(node: ImportCall): boolean { if (moduleKind === ModuleKind.ES2015) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext); + return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext); } if (node.typeArguments) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_have_type_arguments); + return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); } const nodeArguments = node.arguments; @@ -44919,7 +45000,7 @@ namespace ts { if (nodeArguments.length > 1) { const assertionArgument = nodeArguments[1]; - return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext); + return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); } } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 6ed23d16e6b..d60facd264b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -423,7 +423,7 @@ namespace ts { es2020: ModuleKind.ES2020, es2022: ModuleKind.ES2022, esnext: ModuleKind.ESNext, - node12: ModuleKind.Node12, + node16: ModuleKind.Node16, nodenext: ModuleKind.NodeNext, })), affectsModuleResolution: true, @@ -781,7 +781,7 @@ namespace ts { type: new Map(getEntries({ node: ModuleResolutionKind.NodeJs, classic: ModuleResolutionKind.Classic, - node12: ModuleResolutionKind.Node12, + node16: ModuleResolutionKind.Node16, nodenext: ModuleResolutionKind.NodeNext, })), affectsModuleResolution: true, @@ -1263,7 +1263,7 @@ namespace ts { affectsModuleResolution: true, description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, - defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node12_as_modules, + defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules, } ]; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e8a765e514c..2382a16cf1d 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -900,6 +900,10 @@ "category": "Error", "code": 1308 }, + "The current file is a CommonJS module and cannot use 'await' at the top level.": { + "category": "Error", + "code": 1309 + }, "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.": { "category": "Error", "code": 1312 @@ -944,11 +948,11 @@ "category": "Error", "code": 1322 }, - "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'.": { + "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.": { "category": "Error", "code": 1323 }, - "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.": { + "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.": { "category": "Error", "code": 1324 }, @@ -956,7 +960,7 @@ "category": "Error", "code": 1325 }, - "Dynamic import cannot have type arguments.": { + "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.": { "category": "Error", "code": 1326 }, @@ -1016,7 +1020,7 @@ "category": "Error", "code": 1342 }, - "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'.": { + "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.": { "category": "Error", "code": 1343 }, @@ -1140,7 +1144,7 @@ "category": "Message", "code": 1377 }, - "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.": { + "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.": { "category": "Error", "code": 1378 }, @@ -1348,7 +1352,7 @@ "category": "Error", "code": 1431 }, - "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.": { + "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.": { "category": "Error", "code": 1432 }, @@ -1420,7 +1424,7 @@ "category": "Error", "code": 1451 }, - "Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`.": { + "Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`.": { "category": "Error", "code": 1452 }, @@ -1465,7 +1469,7 @@ "category": "Message", "code": 1475 }, - "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules.": { + "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.": { "category": "Message", "code": 1476 }, @@ -1506,9 +1510,14 @@ "category": "Error", "code": 2207 }, - "This type parameter probably needs an `extends object` constraint.": { + + "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.": { "category": "Error", - "code": 2208 + "code": 2209 + }, + "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.": { + "category": "Error", + "code": 2210 }, "Duplicate identifier '{0}'.": { @@ -2511,10 +2520,7 @@ "category": "Error", "code": 2568 }, - "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.": { - "category": "Error", - "code": 2569 - }, + "Could not find name '{0}'. Did you mean '{1}'?": { "category": "Error", "code": 2570 @@ -3369,6 +3375,10 @@ "category": "Error", "code": 2809 }, + "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments.": { + "category": "Error", + "code": 2810 + }, "Initializer for property '{0}'": { "category": "Error", "code": 2811 @@ -3421,11 +3431,11 @@ "category": "Error", "code": 2833 }, - "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.": { + "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.": { "category": "Error", "code": 2834 }, - "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?": { + "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?": { "category": "Error", "code": 2835 }, @@ -6109,10 +6119,6 @@ "category": "Error", "code": 7061 }, - "JSON imports are experimental in ES module mode imports.": { - "category": "Error", - "code": 7062 - }, "You cannot rename this element.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index aca15c666a6..c83713750f2 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -531,6 +531,7 @@ namespace ts { printer.writeFile(sourceFile!, writer, sourceMapGenerator); } + let sourceMapUrlPos; if (sourceMapGenerator) { if (sourceMapDataList) { sourceMapDataList.push({ @@ -548,6 +549,7 @@ namespace ts { if (sourceMappingURL) { if (!writer.isAtStartOfLine()) writer.rawWrite(newLine); + sourceMapUrlPos = writer.getTextPos(); writer.writeComment(`//# ${"sourceMappingURL"}=${sourceMappingURL}`); // Tools can sometimes see this line as a source mapping url comment } @@ -562,7 +564,7 @@ namespace ts { } // Write the output file - writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles); + writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos }); // Reset state writer.clear(); @@ -1170,7 +1172,7 @@ namespace ts { } function getCurrentLineMap() { - return currentLineMap || (currentLineMap = getLineStarts(currentSourceFile!)); + return currentLineMap || (currentLineMap = getLineStarts(Debug.checkDefined(currentSourceFile))); } function emit(node: Node, parenthesizerRule?: (node: Node) => Node): void; @@ -1815,7 +1817,7 @@ namespace ts { const numNodes = bundle ? bundle.sourceFiles.length + numPrepends : 1; for (let i = 0; i < numNodes; i++) { const currentNode = bundle ? i < numPrepends ? bundle.prepends[i] : bundle.sourceFiles[i - numPrepends] : node; - const sourceFile = isSourceFile(currentNode) ? currentNode : isUnparsedSource(currentNode) ? undefined : currentSourceFile!; + const sourceFile = isSourceFile(currentNode) ? currentNode : isUnparsedSource(currentNode) ? undefined : currentSourceFile; const shouldSkip = printerOptions.noEmitHelpers || (!!sourceFile && hasRecordedExternalHelpers(sourceFile)); const shouldBundle = (isSourceFile(currentNode) || isUnparsedSource(currentNode)) && !isOwnFileEmit; const helpers = isUnparsedSource(currentNode) ? currentNode.helpers : getSortedEmitHelpers(currentNode); @@ -2465,7 +2467,7 @@ namespace ts { } const preferNewLine = node.multiLine ? ListFormat.PreferNewLine : ListFormat.None; - const allowTrailingComma = currentSourceFile!.languageVersion >= ScriptTarget.ES5 && !isJsonSourceFile(currentSourceFile!) ? ListFormat.AllowTrailingComma : ListFormat.None; + const allowTrailingComma = currentSourceFile && currentSourceFile.languageVersion >= ScriptTarget.ES5 && !isJsonSourceFile(currentSourceFile) ? ListFormat.AllowTrailingComma : ListFormat.None; emitList(node, node.properties, ListFormat.ObjectLiteralExpressionProperties | allowTrailingComma | preferNewLine); if (indentedFlag) { @@ -2880,7 +2882,7 @@ namespace ts { emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfExpressionStatement); // Emit semicolon in non json files // or if json file that created synthesized expression(eg.define expression statement when --out and amd code generation) - if (!isJsonSourceFile(currentSourceFile!) || nodeIsSynthesized(node.expression)) { + if (!currentSourceFile || !isJsonSourceFile(currentSourceFile) || nodeIsSynthesized(node.expression)) { writeTrailingSemicolon(); } } @@ -3207,7 +3209,7 @@ namespace ts { return false; } - if (!nodeIsSynthesized(body) && !rangeIsOnSingleLine(body, currentSourceFile!)) { + if (!nodeIsSynthesized(body) && currentSourceFile && !rangeIsOnSingleLine(body, currentSourceFile)) { return false; } @@ -3238,12 +3240,7 @@ namespace ts { ? emitBlockFunctionBodyOnSingleLine : emitBlockFunctionBodyWorker; - if (emitBodyWithDetachedComments) { - emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody); - } - else { - emitBlockFunctionBody(body); - } + emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody); decreaseIndent(); writeToken(SyntaxKind.CloseBraceToken, body.statements.end, writePunctuation, body); @@ -3701,9 +3698,10 @@ namespace ts { statements.length === 1 && ( // treat synthesized nodes as located on the same line for emit purposes + !currentSourceFile || nodeIsSynthesized(parentNode) || nodeIsSynthesized(statements[0]) || - rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile!) + rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile) ); let format = ListFormat.CaseOrDefaultClauseStatements; @@ -3958,16 +3956,14 @@ namespace ts { function emitSourceFile(node: SourceFile) { writeLine(); const statements = node.statements; - if (emitBodyWithDetachedComments) { - // Emit detached comment if there are no prologue directives or if the first node is synthesized. - // The synthesized node will have no leading comment so some comments may be missed. - const shouldEmitDetachedComment = statements.length === 0 || - !isPrologueDirective(statements[0]) || - nodeIsSynthesized(statements[0]); - if (shouldEmitDetachedComment) { - emitBodyWithDetachedComments(node, statements, emitSourceFileWorker); - return; - } + // Emit detached comment if there are no prologue directives or if the first node is synthesized. + // The synthesized node will have no leading comment so some comments may be missed. + const shouldEmitDetachedComment = statements.length === 0 || + !isPrologueDirective(statements[0]) || + nodeIsSynthesized(statements[0]); + if (shouldEmitDetachedComment) { + emitBodyWithDetachedComments(node, statements, emitSourceFileWorker); + return; } emitSourceFileWorker(node); } @@ -4369,7 +4365,7 @@ namespace ts { if (isEmpty) { // Write a line terminator if the parent node was multi-line - if (format & ListFormat.MultiLine && !(preserveSourceNewlines && (!parentNode || rangeIsOnSingleLine(parentNode, currentSourceFile!)))) { + if (format & ListFormat.MultiLine && !(preserveSourceNewlines && (!parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile)))) { writeLine(); } else if (format & ListFormat.SpaceBetweenBraces && !(format & ListFormat.NoSpaceIfEmpty)) { @@ -4673,7 +4669,7 @@ namespace ts { const firstChild = children[0]; if (firstChild === undefined) { - return !parentNode || rangeIsOnSingleLine(parentNode, currentSourceFile!) ? 0 : 1; + return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1; } if (firstChild.pos === nextListElementPos) { // If this child starts at the beginning of a list item in a parent list, its leading @@ -4697,7 +4693,7 @@ namespace ts { // JsxText will be written with its leading whitespace, so don't add more manually. return 0; } - if (parentNode && + if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(firstChild) && (!firstChild.parent || getOriginalNode(firstChild.parent) === getOriginalNode(parentNode)) @@ -4710,7 +4706,7 @@ namespace ts { currentSourceFile!, includeComments)); } - return rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile!) ? 0 : 1; + return rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile) ? 0 : 1; } if (synthesizedNodeStartsOnNewLine(firstChild, format)) { return 1; @@ -4728,7 +4724,7 @@ namespace ts { // JsxText will be written with its leading whitespace, so don't add more manually. return 0; } - else if (!nodeIsSynthesized(previousNode) && !nodeIsSynthesized(nextNode)) { + else if (currentSourceFile && !nodeIsSynthesized(previousNode) && !nodeIsSynthesized(nextNode)) { if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) { return getEffectiveLines( includeComments => getLinesBetweenRangeEndAndRangeStart( @@ -4743,7 +4739,7 @@ namespace ts { // expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the // effective source lines between two sibling nodes. else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) { - return rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile!) ? 0 : 1; + return rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1; } // If the two nodes are not comparable, add a line terminator based on the format that can indicate // whether new lines are preferred or not. @@ -4767,9 +4763,9 @@ namespace ts { const lastChild = lastOrUndefined(children); if (lastChild === undefined) { - return !parentNode || rangeIsOnSingleLine(parentNode, currentSourceFile!) ? 0 : 1; + return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1; } - if (parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) { + if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) { if (preserveSourceNewlines) { const end = isNodeArray(children) && !positionIsSynthesized(children.end) ? children.end : lastChild.end; return getEffectiveLines( @@ -4779,7 +4775,7 @@ namespace ts { currentSourceFile!, includeComments)); } - return rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile!) ? 0 : 1; + return rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile) ? 0 : 1; } if (synthesizedNodeStartsOnNewLine(lastChild, format)) { return 1; @@ -4857,7 +4853,7 @@ namespace ts { return 1; } - if (!nodeIsSynthesized(parent) && !nodeIsSynthesized(node1) && !nodeIsSynthesized(node2)) { + if (currentSourceFile && !nodeIsSynthesized(parent) && !nodeIsSynthesized(node1) && !nodeIsSynthesized(node2)) { if (preserveSourceNewlines) { return getEffectiveLines( includeComments => getLinesBetweenRangeEndAndRangeStart( @@ -4866,7 +4862,7 @@ namespace ts { currentSourceFile!, includeComments)); } - return rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile!) ? 0 : 1; + return rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile) ? 0 : 1; } return 0; @@ -4874,7 +4870,7 @@ namespace ts { function isEmptyBlock(block: BlockLike) { return block.statements.length === 0 - && rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile!); + && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node: Node) { @@ -4885,21 +4881,27 @@ namespace ts { return node; } - function getTextOfNode(node: Node, includeTrivia?: boolean): string { + function getTextOfNode(node: Identifier | PrivateIdentifier | LiteralExpression, includeTrivia?: boolean): string { if (isGeneratedIdentifier(node)) { return generateName(node); } - else if ((isIdentifier(node) || isPrivateIdentifier(node)) && (nodeIsSynthesized(node) || !node.parent || !currentSourceFile || (node.parent && currentSourceFile && getSourceFileOfNode(node) !== getOriginalNode(currentSourceFile)))) { - return idText(node); + if (isStringLiteral(node) && node.textSourceNode) { + return getTextOfNode(node.textSourceNode, includeTrivia); } - else if (node.kind === SyntaxKind.StringLiteral && (node as StringLiteral).textSourceNode) { - return getTextOfNode((node as StringLiteral).textSourceNode!, includeTrivia); + const sourceFile = currentSourceFile; // const needed for control flow + const canUseSourceFile = !!sourceFile && !!node.parent && !nodeIsSynthesized(node); + if (isMemberName(node)) { + if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) { + return idText(node); + } } - else if (isLiteralExpression(node) && (nodeIsSynthesized(node) || !node.parent)) { - return node.text; + else { + Debug.assertNode(node, isLiteralExpression); // not strictly necessary + if (!canUseSourceFile) { + return node.text; + } } - - return getSourceTextOfNodeFromSourceFile(currentSourceFile!, node, includeTrivia); + return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia); } function getLiteralTextOfNode(node: LiteralLikeNode, neverAsciiEscape: boolean | undefined, jsxAttributeEscape: boolean): string { @@ -4921,7 +4923,7 @@ namespace ts { | (printerOptions.terminateUnterminatedLiterals ? GetLiteralTextFlags.TerminateUnterminatedLiterals : 0) | (printerOptions.target && printerOptions.target === ScriptTarget.ESNext ? GetLiteralTextFlags.AllowNumericSeparator : 0); - return getLiteralText(node, currentSourceFile!, flags); + return getLiteralText(node, currentSourceFile, flags); } /** @@ -5244,7 +5246,7 @@ namespace ts { switch (node.kind) { case SyntaxKind.Identifier: return makeUniqueName( - getTextOfNode(node), + getTextOfNode(node as Identifier), isUniqueName, !!(flags! & GeneratedIdentifierFlags.Optimistic), !!(flags! & GeneratedIdentifierFlags.ReservedInNestedScopes) @@ -5546,7 +5548,7 @@ namespace ts { } function emitLeadingComment(commentPos: number, commentEnd: number, kind: SyntaxKind, hasTrailingNewLine: boolean, rangePos: number) { - if (!shouldWriteComment(currentSourceFile!.text, commentPos)) return; + if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return; if (!hasWrittenComment) { emitNewLineBeforeLeadingCommentOfPosition(getCurrentLineMap(), writer, rangePos, commentPos); hasWrittenComment = true; @@ -5554,7 +5556,7 @@ namespace ts { // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space emitPos(commentPos); - writeCommentRange(currentSourceFile!.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); + writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); emitPos(commentEnd); if (hasTrailingNewLine) { @@ -5578,14 +5580,14 @@ namespace ts { } function emitTrailingComment(commentPos: number, commentEnd: number, _kind: SyntaxKind, hasTrailingNewLine: boolean) { - if (!shouldWriteComment(currentSourceFile!.text, commentPos)) return; + if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return; // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment2*/ if (!writer.isAtStartOfLine()) { writer.writeSpace(" "); } emitPos(commentPos); - writeCommentRange(currentSourceFile!.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); + writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); emitPos(commentEnd); if (hasTrailingNewLine) { @@ -5603,10 +5605,11 @@ namespace ts { } function emitTrailingCommentOfPositionNoNewline(commentPos: number, commentEnd: number, kind: SyntaxKind) { + if (!currentSourceFile) return; // trailing comments of a position are emitted at /*trailing comment1 */space/*trailing comment*/space emitPos(commentPos); - writeCommentRange(currentSourceFile!.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); + writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); emitPos(commentEnd); if (kind === SyntaxKind.SingleLineCommentTrivia) { @@ -5615,10 +5618,11 @@ namespace ts { } function emitTrailingCommentOfPosition(commentPos: number, commentEnd: number, _kind: SyntaxKind, hasTrailingNewLine: boolean) { + if(!currentSourceFile) return; // trailing comments of a position are emitted at /*trailing comment1 */space/*trailing comment*/space emitPos(commentPos); - writeCommentRange(currentSourceFile!.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); + writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); emitPos(commentEnd); if (hasTrailingNewLine) { @@ -5653,6 +5657,7 @@ namespace ts { } function forEachLeadingCommentWithoutDetachedComments(cb: (commentPos: number, commentEnd: number, kind: SyntaxKind, hasTrailingNewLine: boolean, rangePos: number) => void) { + if (!currentSourceFile) return; // get the leading comments from detachedPos const pos = last(detachedCommentsInfo!).detachedCommentEndPos; if (detachedCommentsInfo!.length - 1) { @@ -5662,11 +5667,11 @@ namespace ts { detachedCommentsInfo = undefined; } - forEachLeadingCommentRange(currentSourceFile!.text, pos, cb, /*state*/ pos); + forEachLeadingCommentRange(currentSourceFile.text, pos, cb, /*state*/ pos); } function emitDetachedCommentsAndUpdateCommentsInfo(range: TextRange) { - const currentDetachedCommentInfo = emitDetachedComments(currentSourceFile!.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled); + const currentDetachedCommentInfo = currentSourceFile && emitDetachedComments(currentSourceFile.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled); if (currentDetachedCommentInfo) { if (detachedCommentsInfo) { detachedCommentsInfo.push(currentDetachedCommentInfo); @@ -5678,7 +5683,7 @@ namespace ts { } function emitComment(text: string, lineMap: number[], writer: EmitTextWriter, commentPos: number, commentEnd: number, newLine: string) { - if (!shouldWriteComment(currentSourceFile!.text, commentPos)) return; + if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return; emitPos(commentPos); writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine); emitPos(commentEnd); @@ -5690,7 +5695,7 @@ namespace ts { * @return true if the comment is a triple-slash comment else false */ function isTripleSlashComment(commentPos: number, commentEnd: number) { - return isRecognizedTripleSlashComment(currentSourceFile!.text, commentPos, commentEnd); + return !!currentSourceFile && isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd); } // Source Maps diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index cbeb8df5e5b..9028c521a13 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -5275,7 +5275,7 @@ namespace ts { hasNoDefaultLib: boolean, libReferences: readonly FileReference[] ) { - const node = baseFactory.createBaseSourceFileNode(SyntaxKind.SourceFile) as Mutable; + const node = (source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory.createBaseSourceFileNode(SyntaxKind.SourceFile)) as Mutable; for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; (node as any)[p] = (source as any)[p]; diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 15022bd59f6..8f466c0495a 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -86,14 +86,15 @@ namespace ts { return { fileName: resolved.path, packageId: resolved.packageId }; } - function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean | undefined, failedLookupLocations: string[], resultFromCache: ResolvedModuleWithFailedLookupLocations | undefined): ResolvedModuleWithFailedLookupLocations { + function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean | undefined, failedLookupLocations: string[], diagnostics: Diagnostic[], resultFromCache: ResolvedModuleWithFailedLookupLocations | undefined): ResolvedModuleWithFailedLookupLocations { if (resultFromCache) { resultFromCache.failedLookupLocations.push(...failedLookupLocations); return resultFromCache; } return { resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId }, - failedLookupLocations + failedLookupLocations, + resolutionDiagnostics: diagnostics }; } @@ -107,6 +108,8 @@ namespace ts { packageJsonInfoCache: PackageJsonInfoCache | undefined; features: NodeResolutionFeatures; conditions: string[]; + requestContainingDirectory: string | undefined; + reportDiagnostic: DiagnosticReporter; } /** Just the fields that we use for module resolution. */ @@ -348,13 +351,24 @@ namespace ts { // set in a non-modal module resolution setting here. Do note that our behavior is not particularly well defined when these mode-overriding imports // are present in a non-modal project; while in theory we'd like to either ignore the mode or provide faithful modern resolution, depending on what we feel is best, // in practice, not every cache has the options available to intelligently make the choice to ignore the mode request, and it's unclear how modern "faithful modern - // resolution" should be (`node12`? `nodenext`?). As such, witnessing a mode-overriding triple-slash reference in a non-modal module resolution + // resolution" should be (`node16`? `nodenext`?). As such, witnessing a mode-overriding triple-slash reference in a non-modal module resolution // context should _probably_ be an error - and that should likely be handled by the `Program` (which is what we do). - if (resolutionMode === ModuleKind.ESNext && (getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node12 || getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeNext)) { + if (resolutionMode === ModuleKind.ESNext && (getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeNext)) { features |= NodeResolutionFeatures.EsmMode; } const conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : []; - const moduleResolutionState: ModuleResolutionState = { compilerOptions: options, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features, conditions }; + const diagnostics: Diagnostic[] = []; + const moduleResolutionState: ModuleResolutionState = { + compilerOptions: options, + host, + traceEnabled, + failedLookupLocations, + packageJsonInfoCache: cache, + features, + conditions, + requestContainingDirectory: containingDirectory, + reportDiagnostic: diag => void diagnostics.push(diag), + }; let resolved = primaryLookup(); let primary = true; if (!resolved) { @@ -374,7 +388,7 @@ namespace ts { isExternalLibraryImport: pathContainsNodeModules(fileName), }; } - result = { resolvedTypeReferenceDirective, failedLookupLocations }; + result = { resolvedTypeReferenceDirective, failedLookupLocations, resolutionDiagnostics: diagnostics }; perFolderCache?.set(typeReferenceDirectiveName, /*mode*/ resolutionMode, result); if (traceEnabled) traceResult(result); return result; @@ -444,7 +458,7 @@ namespace ts { } function getDefaultNodeResolutionFeatures(options: CompilerOptions) { - return getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default : + return getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node16 ? NodeResolutionFeatures.Node16Default : getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault : NodeResolutionFeatures.None; } @@ -468,6 +482,8 @@ namespace ts { packageJsonInfoCache: cache?.getPackageJsonInfoCache(), conditions: emptyArray, features: NodeResolutionFeatures.None, + requestContainingDirectory: containingDirectory, + reportDiagnostic: noop }; return forEachAncestorDirectory(containingDirectory, ancestorDirectory => { @@ -950,8 +966,8 @@ namespace ts { case ModuleKind.CommonJS: moduleResolution = ModuleResolutionKind.NodeJs; break; - case ModuleKind.Node12: - moduleResolution = ModuleResolutionKind.Node12; + case ModuleKind.Node16: + moduleResolution = ModuleResolutionKind.Node16; break; case ModuleKind.NodeNext: moduleResolution = ModuleResolutionKind.NodeNext; @@ -972,8 +988,8 @@ namespace ts { perfLogger.logStartResolveModule(moduleName /* , containingFile, ModuleResolutionKind[moduleResolution]*/); switch (moduleResolution) { - case ModuleResolutionKind.Node12: - result = node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); + case ModuleResolutionKind.Node16: + result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); break; case ModuleResolutionKind.NodeNext: result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); @@ -1231,22 +1247,22 @@ namespace ts { // respecting the `.exports` member of packages' package.json files and its (conditional) mappings of export names Exports = 1 << 3, // allowing `*` in the LHS of an export to be followed by more content, eg `"./whatever/*.js"` - // not currently backported to node 12 - https://github.com/nodejs/Release/issues/690 + // not supported in node 12 - https://github.com/nodejs/Release/issues/690 ExportsPatternTrailers = 1 << 4, AllFeatures = Imports | SelfName | Exports | ExportsPatternTrailers, - Node12Default = Imports | SelfName | Exports, + Node16Default = Imports | SelfName | Exports | ExportsPatternTrailers, NodeNextDefault = AllFeatures, EsmMode = 1 << 5, } - function node12ModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, + function node16ModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations { return nodeNextModuleNameResolverWorker( - NodeResolutionFeatures.Node12Default, + NodeResolutionFeatures.Node16Default, moduleName, containingFile, compilerOptions, @@ -1310,13 +1326,14 @@ namespace ts { const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations: string[] = []; - // conditions are only used by the node12/nodenext resolver - there's no priority order in the list, + // conditions are only used by the node16/nodenext resolver - there's no priority order in the list, //it's essentially a set (priority is determined by object insertion order in the object we look at). const conditions = features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"]; if (compilerOptions.noDtsResolution) { conditions.pop(); } + const diagnostics: Diagnostic[] = []; const state: ModuleResolutionState = { compilerOptions, host, @@ -1325,10 +1342,12 @@ namespace ts { packageJsonInfoCache: cache, features, conditions, + requestContainingDirectory: containingDirectory, + reportDiagnostic: diag => void diagnostics.push(diag), }; const result = forEach(extensions, ext => tryResolve(ext)); - return createResolvedModuleWithFailedLookupLocations(result?.value?.resolved, result?.value?.isExternalLibraryImport, failedLookupLocations, state.resultFromCache); + return createResolvedModuleWithFailedLookupLocations(result?.value?.resolved, result?.value?.isExternalLibraryImport, failedLookupLocations, diagnostics, state.resultFromCache); function tryResolve(extensions: Extensions): SearchResult<{ resolved: Resolved, isExternalLibraryImport: boolean }> { const loader: ResolutionKindSpecificLoader = (extensions, candidate, onlyRecordFailures, state) => nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, /*considerPackageJson*/ true); @@ -1516,9 +1535,9 @@ namespace ts { } function loadJSOrExactTSFileName(extensions: Extensions, candidate: string, onlyRecordFailures: boolean, state: ModuleResolutionState): PathAndExtension | undefined { - if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && isDeclarationFileName(candidate)) { + if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && fileExtensionIsOneOf(candidate, supportedTSExtensionsFlat)) { const result = tryFile(candidate, onlyRecordFailures, state); - return result !== undefined ? { path: candidate, ext: forEach(supportedDeclarationExtensions, e => fileExtensionIs(candidate, e) ? e : undefined)! } : undefined; + return result !== undefined ? { path: candidate, ext: tryExtractTSExtension(candidate) as Extension } : undefined; } return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state); @@ -1655,6 +1674,8 @@ namespace ts { packageJsonInfoCache: cache?.getPackageJsonInfoCache(), conditions: ["node", "require", "types"], features, + requestContainingDirectory: packageJsonInfo.packageDirectory, + reportDiagnostic: noop }; const requireResolution = loadNodeModuleFromDirectoryWorker( extensions, @@ -1764,6 +1785,8 @@ namespace ts { packageJsonInfoCache: PackageJsonInfoCache | undefined; features: number; conditions: never[]; + requestContainingDirectory: string | undefined; + reportDiagnostic: DiagnosticReporter } = { host, compilerOptions: options, @@ -1772,6 +1795,8 @@ namespace ts { packageJsonInfoCache, features: 0, conditions: [], + requestContainingDirectory: undefined, + reportDiagnostic: noop }; const parts = getPathComponents(fileName); parts.pop(); @@ -2112,8 +2137,9 @@ namespace ts { } return toSearchResult(/*value*/ undefined); } - const finalPath = getNormalizedAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath, state.host.getCurrentDirectory?.()); - + const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); + const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); + if (inputLink) return inputLink; return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, /*onlyRecordFailures*/ false, state))); } else if (typeof target === "object" && target !== null) { // eslint-disable-line no-null/no-null @@ -2154,6 +2180,134 @@ namespace ts { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } return toSearchResult(/*value*/ undefined); + + function toAbsolutePath(path: string): string; + function toAbsolutePath(path: string | undefined): string | undefined; + function toAbsolutePath(path: string | undefined): string | undefined { + if (path === undefined) return path; + return hostGetCanonicalFileName({ useCaseSensitiveFileNames })(getNormalizedAbsolutePath(path, state.host.getCurrentDirectory?.())); + } + + function combineDirectoryPath(root: string, dir: string) { + return ensureTrailingDirectorySeparator(combinePaths(root, dir)); + } + + function useCaseSensitiveFileNames() { + return !state.host.useCaseSensitiveFileNames ? true : + typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : + state.host.useCaseSensitiveFileNames(); + } + + function tryLoadInputFileForPath(finalPath: string, entry: string, packagePath: string, isImports: boolean) { + // Replace any references to outputs for files in the program with the input files to support package self-names used with outDir + // PROBLEM: We don't know how to calculate the output paths yet, because the "common source directory" we use as the base of the file structure + // we reproduce into the output directory is based on the set of input files, which we're still in the process of traversing and resolving! + // _Given that_, we have to guess what the base of the output directory is (obviously the user wrote the export map, so has some idea what it is!). + // We are going to probe _so many_ possible paths. We limit where we'll do this to try to reduce the possibilities of false positive lookups. + if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json) + && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) + && finalPath.indexOf("/node_modules/") === -1 + && (state.compilerOptions.configFile ? startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true) + ) { + // So that all means we'll only try these guesses for files outside `node_modules` in a directory where the `package.json` and `tsconfig.json` are siblings. + // Even with all that, we still don't know if the root of the output file structure will be (relative to the package file) + // `.`, `./src` or any other deeper directory structure. (If project references are used, it's definitely `.` by fiat, so that should be pretty common.) + + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + const commonSourceDirGuesses: string[] = []; + // A `rootDir` compiler option strongly indicates the root location + // A `composite` project is using project references and has it's common src dir set to `.`, so it shouldn't need to check any other locations + if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) { + const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], state.host.getCurrentDirectory?.() || "", getCanonicalFileName)); + commonSourceDirGuesses.push(commonDir); + } + else if (state.requestContainingDirectory) { + // However without either of those set we're in the dark. Let's say you have + // + // ./tools/index.ts + // ./src/index.ts + // ./dist/index.js + // ./package.json <-- references ./dist/index.js + // ./tsconfig.json <-- loads ./src/index.ts + // + // How do we know `./src` is the common src dir, and not `./tools`, given only the `./dist` out dir and `./dist/index.js` filename? + // Answer: We... don't. We know we're looking for an `index.ts` input file, but we have _no clue_ which subfolder it's supposed to be loaded from + // without more context. + // But we do have more context! Just a tiny bit more! We're resolving an import _for some other input file_! And that input file, too + // must be inside the common source directory! So we propagate that tidbit of info all the way to here via state.requestContainingDirectory + + const requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, "index.ts")); + // And we can try every folder above the common folder for the request folder and the config/package base directory + // This technically can be wrong - we may load ./src/index.ts when ./src/sub/index.ts was right because we don't + // know if only `./src/sub` files were loaded by the program; but this has the best chance to be right of just about anything + // else we have. And, given that we're about to load `./src/index.ts` because we choose it as likely correct, there will then + // be a file outside of `./src/sub` in the program (the file we resolved to), making us de-facto right. So this fallback lookup + // logic may influence what files are pulled in by self-names, which in turn influences the output path shape, but it's all + // internally consistent so the paths should be stable so long as we prefer the "most general" (meaning: top-most-level directory) possible results first. + const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [requestingFile, toAbsolutePath(packagePath)], state.host.getCurrentDirectory?.() || "", getCanonicalFileName)); + commonSourceDirGuesses.push(commonDir); + + let fragment = ensureTrailingDirectorySeparator(commonDir); + while (fragment && fragment.length > 1) { + const parts = getPathComponents(fragment); + parts.pop(); // remove a directory + const commonDir = getPathFromPathComponents(parts); + commonSourceDirGuesses.unshift(commonDir); + fragment = ensureTrailingDirectorySeparator(commonDir); + } + } + if (commonSourceDirGuesses.length > 1) { + state.reportDiagnostic(createCompilerDiagnostic( + isImports + ? Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate + : Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, + entry === "" ? "." : entry, // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird + packagePath + )); + } + for (const commonSourceDirGuess of commonSourceDirGuesses) { + const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); + for (const candidateDir of candidateDirectories) { + if (startsWith(finalPath, candidateDir)) { + // The matched export is looking up something in either the out declaration or js dir, now map the written path back into the source dir and source extension + const pathFragment = finalPath.slice(candidateDir.length + 1); // +1 to also remove directory seperator + const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); + const jsAndDtsExtensions = [Extension.Mjs, Extension.Cjs, Extension.Js, Extension.Json, Extension.Dmts, Extension.Dcts, Extension.Dts]; + for (const ext of jsAndDtsExtensions) { + if (fileExtensionIs(possibleInputBase, ext)) { + const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase); + for (const possibleExt of inputExts) { + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + if ((extensions === Extensions.TypeScript && hasJSFileExtension(possibleInputWithInputExtension)) || + (extensions === Extensions.JavaScript && hasTSFileExtension(possibleInputWithInputExtension))) { + continue; + } + if (state.host.fileExists(possibleInputWithInputExtension)) { + return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, /*onlyRecordFailures*/ false, state))); + } + } + } + } + } + } + } + } + return undefined; + + function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess: string) { + // Config file ouput paths are processed to be relative to the host's current directory, while + // otherwise the paths are resolved relative to the common source dir the compiler puts together + const currentDir = state.compilerOptions.configFile ? state.host.getCurrentDirectory?.() || "" : commonSourceDirGuess; + const candidateDirectories = []; + if (state.compilerOptions.declarationDir) { + candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir))); + } + if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) { + candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir))); + } + return candidateDirectories; + } + } } } @@ -2374,12 +2528,13 @@ namespace ts { export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations: string[] = []; - const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] }; const containingDirectory = getDirectoryPath(containingFile); + const diagnostics: Diagnostic[] = []; + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: containingDirectory, reportDiagnostic: diag => void diagnostics.push(diag) }; const resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript); // No originalPath because classic resolution doesn't resolve realPath - return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations, state.resultFromCache); + return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations, diagnostics, state.resultFromCache); function tryResolve(extensions: Extensions): SearchResult { const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); @@ -2424,9 +2579,10 @@ namespace ts { trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); } const failedLookupLocations: string[] = []; - const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [] }; + const diagnostics: Diagnostic[] = []; + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations, packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: undefined, reportDiagnostic: diag => void diagnostics.push(diag) }; const resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, /*typesScopeOnly*/ false, /*cache*/ undefined, /*redirectedReference*/ undefined); - return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations, state.resultFromCache); + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations, diagnostics, state.resultFromCache); } /** diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 270bee0048e..542afb796a9 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -41,7 +41,7 @@ namespace ts.moduleSpecifiers { } function isFormatRequiringExtensions(compilerOptions: CompilerOptions, importingSourceFileName: Path, host: ModuleSpecifierResolutionHost) { - if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node12 + if (getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.NodeNext) { return false; } @@ -734,7 +734,7 @@ namespace ts.moduleSpecifiers { const cachedPackageJson = host.getPackageJsonInfoCache?.()?.getPackageJsonInfo(packageJsonPath); if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) { const packageJsonContent = cachedPackageJson?.packageJsonContent || JSON.parse(host.readFile!(packageJsonPath)!); - if (getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node12 || getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeNext) { + if (getEmitModuleResolutionKind(options) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeNext) { // `conditions` *could* be made to go against `importingSourceFile.impliedNodeFormat` if something wanted to generate // an ImportEqualsDeclaration in an ESM-implied file or an ImportCall in a CJS-implied file. But since this function is // usually called to conjure an import out of thin air, we don't have an existing usage to call `getModeForUsageAtIndex` diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 247381f0251..240385df8df 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -683,7 +683,7 @@ namespace ts { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`. + * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. */ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; /** @@ -944,7 +944,7 @@ namespace ts { initializeState("", content, languageVersion, /*syntaxCursor*/ undefined, ScriptKind.JS); // Prime the scanner. nextToken(); - const entityName = parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ false); + const entityName = parseEntityName(/*allowReservedWords*/ true); const isInvalid = token() === SyntaxKind.EndOfFileToken && !parseDiagnostics.length; clearState(); return isInvalid ? entityName : undefined; @@ -2829,7 +2829,7 @@ namespace ts { return createMissingList(); } - function parseEntityName(allowReservedWords: boolean, allowPrivateIdentifiers: boolean, diagnosticMessage?: DiagnosticMessage): EntityName { + function parseEntityName(allowReservedWords: boolean, diagnosticMessage?: DiagnosticMessage): EntityName { const pos = getNodePos(); let entity: EntityName = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage); let dotPos = getNodePos(); @@ -2843,7 +2843,7 @@ namespace ts { entity = finishNode( factory.createQualifiedName( entity, - parseRightSideOfDot(allowReservedWords, allowPrivateIdentifiers) as Identifier + parseRightSideOfDot(allowReservedWords, /* allowPrivateIdentifiers */ false) as Identifier ), pos ); @@ -3028,7 +3028,7 @@ namespace ts { // TYPES function parseEntityNameOfTypeReference() { - return parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ false, Diagnostics.Type_expected); + return parseEntityName(/*allowReservedWords*/ true, Diagnostics.Type_expected); } function parseTypeArgumentsOfTypeReference() { @@ -3188,8 +3188,9 @@ namespace ts { function parseTypeQuery(): TypeQueryNode { const pos = getNodePos(); parseExpected(SyntaxKind.TypeOfKeyword); - const entityName = parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ true); - const typeArguments = tryParseTypeArguments(); + const entityName = parseEntityName(/*allowReservedWords*/ true); + // Make sure we perform ASI to prevent parsing the next line's type arguments as part of an instantiation expression. + const typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined; return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos); } @@ -4289,10 +4290,10 @@ namespace ts { } const pos = getNodePos(); - let expr = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + let expr = parseAssignmentExpressionOrHigher(); let operatorToken: BinaryOperatorToken; while ((operatorToken = parseOptionalToken(SyntaxKind.CommaToken))) { - expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false), pos); + expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(), pos); } if (saveDecoratorContext) { @@ -4302,10 +4303,10 @@ namespace ts { } function parseInitializer(): Expression | undefined { - return parseOptional(SyntaxKind.EqualsToken) ? parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false) : undefined; + return parseOptional(SyntaxKind.EqualsToken) ? parseAssignmentExpressionOrHigher() : undefined; } - function parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction: boolean): Expression { + function parseAssignmentExpressionOrHigher(): Expression { // AssignmentExpression[in,yield]: // 1) ConditionalExpression[?in,?yield] // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] @@ -4333,7 +4334,7 @@ namespace ts { // If we do successfully parse arrow-function, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. - const arrowExpression = tryParseParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction) || tryParseAsyncSimpleArrowFunctionExpression(disallowReturnTypeInArrowFunction); + const arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression(); if (arrowExpression) { return arrowExpression; } @@ -4354,7 +4355,7 @@ namespace ts { // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single // identifier and the current token is an arrow. if (expr.kind === SyntaxKind.Identifier && token() === SyntaxKind.EqualsGreaterThanToken) { - return parseSimpleArrowFunctionExpression(pos, expr as Identifier, disallowReturnTypeInArrowFunction, /*asyncModifier*/ undefined); + return parseSimpleArrowFunctionExpression(pos, expr as Identifier, /*asyncModifier*/ undefined); } // Now see if we might be in cases '2' or '3'. @@ -4364,7 +4365,7 @@ namespace ts { // Note: we call reScanGreaterToken so that we get an appropriately merged token // for cases like `> > =` becoming `>>=` if (isLeftHandSideExpression(expr) && isAssignmentOperator(reScanGreaterToken())) { - return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction), pos); + return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(), pos); } // It wasn't an assignment or a lambda. This is a conditional expression: @@ -4418,7 +4419,7 @@ namespace ts { return finishNode( factory.createYieldExpression( parseOptionalToken(SyntaxKind.AsteriskToken), - parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false) + parseAssignmentExpressionOrHigher() ), pos ); @@ -4430,7 +4431,7 @@ namespace ts { } } - function parseSimpleArrowFunctionExpression(pos: number, identifier: Identifier, disallowReturnTypeInArrowFunction: boolean, asyncModifier?: NodeArray | undefined): ArrowFunction { + function parseSimpleArrowFunctionExpression(pos: number, identifier: Identifier, asyncModifier?: NodeArray | undefined): ArrowFunction { Debug.assert(token() === SyntaxKind.EqualsGreaterThanToken, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory.createParameterDeclaration( /*decorators*/ undefined, @@ -4445,12 +4446,12 @@ namespace ts { const parameters = createNodeArray([parameter], parameter.pos, parameter.end); const equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken); - const body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier, disallowReturnTypeInArrowFunction); + const body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier); const node = factory.createArrowFunction(asyncModifier, /*typeParameters*/ undefined, parameters, /*type*/ undefined, equalsGreaterThanToken, body); return addJSDocComment(finishNode(node, pos)); } - function tryParseParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction: boolean): Expression | undefined { + function tryParseParenthesizedArrowFunctionExpression(): Expression | undefined { const triState = isParenthesizedArrowFunctionExpression(); if (triState === Tristate.False) { // It's definitely not a parenthesized arrow function expression. @@ -4462,8 +4463,8 @@ namespace ts { // it out, but don't allow any ambiguity, and return 'undefined' if this could be an // expression instead. return triState === Tristate.True ? - parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ true, /*disallowReturnTypeInArrowFunction*/ false) : - tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction)); + parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ true) : + tryParse(parsePossibleParenthesizedArrowFunctionExpression); } // True -> We definitely expect a parenthesized arrow function here. @@ -4609,13 +4610,13 @@ namespace ts { } } - function parsePossibleParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction: boolean): ArrowFunction | undefined { + function parsePossibleParenthesizedArrowFunctionExpression(): ArrowFunction | undefined { const tokenPos = scanner.getTokenPos(); if (notParenthesizedArrow?.has(tokenPos)) { return undefined; } - const result = parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ false, disallowReturnTypeInArrowFunction); + const result = parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ false); if (!result) { (notParenthesizedArrow || (notParenthesizedArrow = new Set())).add(tokenPos); } @@ -4623,14 +4624,14 @@ namespace ts { return result; } - function tryParseAsyncSimpleArrowFunctionExpression(disallowReturnTypeInArrowFunction: boolean): ArrowFunction | undefined { + function tryParseAsyncSimpleArrowFunctionExpression(): ArrowFunction | undefined { // We do a check here so that we won't be doing unnecessarily call to "lookAhead" if (token() === SyntaxKind.AsyncKeyword) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === Tristate.True) { const pos = getNodePos(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(OperatorPrecedence.Lowest); - return parseSimpleArrowFunctionExpression(pos, expr as Identifier, disallowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr as Identifier, asyncModifier); } } return undefined; @@ -4657,7 +4658,7 @@ namespace ts { return Tristate.False; } - function parseParenthesizedArrowFunctionExpression(allowAmbiguity: boolean, disallowReturnTypeInArrowFunction: boolean): ArrowFunction | undefined { + function parseParenthesizedArrowFunctionExpression(allowAmbiguity: boolean): ArrowFunction | undefined { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiersForArrowFunction(); @@ -4694,24 +4695,6 @@ namespace ts { } } - // Given: - // x ? y => ({ y }) : z => ({ z }) - // We try to parse the body of the first arrow function by looking at: - // ({ y }) : z => ({ z }) - // This is a valid arrow function with "z" as the return type. - // - // But, if we're in the true side of a conditional expression, this colon - // terminates the expression, so we cannot allow a return type if we aren't - // certain whether or not the preceding text was parsed as a parameter list. - // - // For example, - // a() ? (b: number, c?: string): void => d() : e - // is determined by isParenthesizedArrowFunctionExpression to unambiguously - // be an arrow expression, so we allow a return type. - if (disallowReturnTypeInArrowFunction && token() === SyntaxKind.ColonToken) { - return undefined; - } - const type = parseReturnType(SyntaxKind.ColonToken, /*isType*/ false); if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) { return undefined; @@ -4744,14 +4727,14 @@ namespace ts { const lastToken = token(); const equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken); const body = (lastToken === SyntaxKind.EqualsGreaterThanToken || lastToken === SyntaxKind.OpenBraceToken) - ? parseArrowFunctionExpressionBody(some(modifiers, isAsyncModifier), disallowReturnTypeInArrowFunction) + ? parseArrowFunctionExpressionBody(some(modifiers, isAsyncModifier)) : parseIdentifier(); const node = factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function parseArrowFunctionExpressionBody(isAsync: boolean, disallowReturnTypeInArrowFunction: boolean): Block | Expression { + function parseArrowFunctionExpressionBody(isAsync: boolean): Block | Expression { if (token() === SyntaxKind.OpenBraceToken) { return parseFunctionBlock(isAsync ? SignatureFlags.Await : SignatureFlags.None); } @@ -4781,8 +4764,8 @@ namespace ts { const savedTopLevel = topLevel; topLevel = false; const node = isAsync - ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction)) - : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction)); + ? doInAwaitContext(parseAssignmentExpressionOrHigher) + : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher); topLevel = savedTopLevel; return node; } @@ -4801,10 +4784,10 @@ namespace ts { factory.createConditionalExpression( leftOperand, questionToken, - doOutsideOfContext(disallowInAndDecoratorContext, () => parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ true)), + doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(SyntaxKind.ColonToken), nodeIsPresent(colonToken) - ? parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ true) + ? parseAssignmentExpressionOrHigher() : createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ false, Diagnostics._0_expected, tokenToString(SyntaxKind.ColonToken)) ), pos @@ -5802,14 +5785,14 @@ namespace ts { function parseSpreadElement(): Expression { const pos = getNodePos(); parseExpected(SyntaxKind.DotDotDotToken); - const expression = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + const expression = parseAssignmentExpressionOrHigher(); return finishNode(factory.createSpreadElement(expression), pos); } function parseArgumentOrArrayLiteralElement(): Expression { return token() === SyntaxKind.DotDotDotToken ? parseSpreadElement() : token() === SyntaxKind.CommaToken ? finishNode(factory.createOmittedExpression(), getNodePos()) : - parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + parseAssignmentExpressionOrHigher(); } function parseArgumentExpression(): Expression { @@ -5831,7 +5814,7 @@ namespace ts { const hasJSDoc = hasPrecedingJSDocComment(); if (parseOptionalToken(SyntaxKind.DotDotDotToken)) { - const expression = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + const expression = parseAssignmentExpressionOrHigher(); return withJSDoc(finishNode(factory.createSpreadAssignment(expression), pos), hasJSDoc); } @@ -5866,7 +5849,7 @@ namespace ts { const isShorthandPropertyAssignment = tokenIsIdentifier && (token() !== SyntaxKind.ColonToken); if (isShorthandPropertyAssignment) { const equalsToken = parseOptionalToken(SyntaxKind.EqualsToken); - const objectAssignmentInitializer = equalsToken ? allowInAnd(() => parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false)) : undefined; + const objectAssignmentInitializer = equalsToken ? allowInAnd(parseAssignmentExpressionOrHigher) : undefined; node = factory.createShorthandPropertyAssignment(name as Identifier, objectAssignmentInitializer); // Save equals token for error reporting. // TODO(rbuckton): Consider manufacturing this when we need to report an error as it is otherwise not useful. @@ -5874,7 +5857,7 @@ namespace ts { } else { parseExpected(SyntaxKind.ColonToken); - const initializer = allowInAnd(() => parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false)); + const initializer = allowInAnd(parseAssignmentExpressionOrHigher); node = factory.createPropertyAssignment(name, initializer); } // Decorators, Modifiers, questionToken, and exclamationToken are not supported by property assignments and are reported in the grammar checker @@ -6074,7 +6057,7 @@ namespace ts { let node: IterationStatement; if (awaitToken ? parseExpected(SyntaxKind.OfKeyword) : parseOptional(SyntaxKind.OfKeyword)) { - const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false)); + const expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(SyntaxKind.CloseParenToken); node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement()); } @@ -7416,7 +7399,7 @@ namespace ts { const pos = getNodePos(); const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(SyntaxKind.StringLiteral) as StringLiteral; parseExpected(SyntaxKind.ColonToken); - const value = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + const value = parseAssignmentExpressionOrHigher(); return finishNode(factory.createAssertEntry(name, value), pos); } @@ -7487,7 +7470,7 @@ namespace ts { function parseModuleReference() { return isExternalModuleReference() ? parseExternalModuleReference() - : parseEntityName(/*allowReservedWords*/ false, /*allowPrivateIdentifiers*/ false); + : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { @@ -7682,7 +7665,7 @@ namespace ts { else { parseExpected(SyntaxKind.DefaultKeyword); } - const expression = parseAssignmentExpressionOrHigher(/*disallowReturnTypeInArrowFunction*/ false); + const expression = parseAssignmentExpressionOrHigher(); parseSemicolon(); setAwaitContext(savedAwaitContext); const node = factory.createExportAssignment(decorators, modifiers, isExportEquals, expression); @@ -7760,7 +7743,7 @@ namespace ts { const pos = getNodePos(); const hasBrace = parseOptional(SyntaxKind.OpenBraceToken); const p2 = getNodePos(); - let entityName: EntityName | JSDocMemberName = parseEntityName(/* allowReservedWords*/ false, /*allowPrivateIdentifiers*/ false); + let entityName: EntityName | JSDocMemberName = parseEntityName(/* allowReservedWords*/ false); while (token() === SyntaxKind.PrivateIdentifier) { reScanHashToken(); // rescan #id as # id nextTokenJSDoc(); // then skip the # @@ -8223,7 +8206,7 @@ namespace ts { // parseEntityName logs an error for non-identifier, so create a MissingNode ourselves to avoid the error const p2 = getNodePos(); let name: EntityName | JSDocMemberName | undefined = tokenIsIdentifierOrKeyword(token()) - ? parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ false) + ? parseEntityName(/*allowReservedWords*/ true) : undefined; if (name) { while (token() === SyntaxKind.PrivateIdentifier) { @@ -8578,7 +8561,8 @@ namespace ts { if (!comment) { comment = parseTrailingTagComments(start, getNodePos(), indent, indentText); } - return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start); + const end = comment !== undefined ? getNodePos() : typeExpression.end; + return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end); } function escapedTextsEqual(a: EntityName, b: EntityName): boolean { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 615d52fb68e..2d7777e7631 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -262,7 +262,7 @@ namespace ts { return newValue; }; if (originalWriteFile) { - host.writeFile = (fileName, data, writeByteOrderMark, onError, sourceFiles) => { + host.writeFile = (fileName, data, ...rest) => { const key = toPath(fileName); fileExistsCache.delete(key); @@ -277,7 +277,7 @@ namespace ts { sourceFileCache.delete(key); } } - originalWriteFile.call(host, fileName, data, writeByteOrderMark, onError, sourceFiles); + originalWriteFile.call(host, fileName, data, ...rest); }; } @@ -858,7 +858,7 @@ namespace ts { */ export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined { switch (getEmitModuleResolutionKind(options)) { - case ModuleResolutionKind.Node12: + case ModuleResolutionKind.Node16: case ModuleResolutionKind.NodeNext: return fileExtensionIsOneOf(fileName, [Extension.Dmts, Extension.Mts, Extension.Mjs]) ? ModuleKind.ESNext : fileExtensionIsOneOf(fileName, [Extension.Dcts, Extension.Cts, Extension.Cjs]) ? ModuleKind.CommonJS : @@ -913,7 +913,6 @@ namespace ts { Diagnostics.A_rest_parameter_cannot_have_an_initializer.code, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code, - Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code, Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code, Diagnostics.A_set_accessor_cannot_have_rest_parameter.code, Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code, @@ -1210,7 +1209,7 @@ namespace ts { const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile); const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename); for (let i = 0; i < typeReferences.length; i++) { - // under node12/nodenext module resolution, load `types`/ata include names as cjs resolution results by passing an `undefined` mode + // under node16/nodenext module resolution, load `types`/ata include names as cjs resolution results by passing an `undefined` mode processTypeReferenceDirective(typeReferences[i], /*mode*/ undefined, resolutions[i], { kind: FileIncludeKind.AutomaticTypeDirectiveFile, typeReference: typeReferences[i], packageId: resolutions[i]?.packageId }); } tracing?.pop(); @@ -1340,6 +1339,7 @@ namespace ts { useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), getFileIncludeReasons: () => fileReasons, structureIsReused, + writeFile, }; onProgramCreateComplete(); @@ -1364,6 +1364,36 @@ namespace ts { return program; + function addResolutionDiagnostics(list: Diagnostic[] | undefined) { + if (!list) return; + for (const elem of list) { + programDiagnostics.add(elem); + } + } + + function pullDiagnosticsFromCache(names: string[] | readonly FileReference[], containingFile: SourceFile) { + if (!moduleResolutionCache) return; + const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); + const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : undefined; + const containingDir = getDirectoryPath(containingFileName); + const redirectedReference = getRedirectReferenceForResolution(containingFile); + let i = 0; + for (const n of names) { + // mimics logic done in the resolution cache, should be resilient to upgrading it to use `FileReference`s for non-type-reference modal lookups to make it rely on the index in the list less + const mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode); + const name = typeof n === "string" ? n : n.fileName; + i++; + // only nonrelative names hit the cache, and, at least as of right now, only nonrelative names can issue diagnostics + // (Since diagnostics are only issued via import or export map lookup) + // This may totally change if/when the issue of output paths not mapping to input files is fixed in a broader context + // When it is, how we extract diagnostics from the module name resolver will have the be refined - the current cache + // APIs wrapping the underlying resolver make it almost impossible to smuggle the diagnostics out in a generalized way + if (isExternalModuleNameRelative(name)) continue; + const diags = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)?.resolutionDiagnostics; + addResolutionDiagnostics(diags); + } + } + function resolveModuleNamesWorker(moduleNames: string[], containingFile: SourceFile, reusedNames: string[] | undefined): readonly ResolvedModuleFull[] { if (!moduleNames.length) return emptyArray; const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); @@ -1374,6 +1404,7 @@ namespace ts { performance.mark("afterResolveModule"); performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); tracing?.pop(); + pullDiagnosticsFromCache(moduleNames, containingFile); return result; } @@ -1894,8 +1925,7 @@ namespace ts { getProjectReferenceRedirect, isSourceOfProjectReferenceRedirect, getSymlinkCache, - writeFile: writeFileCallback || ( - (fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)), + writeFile: writeFileCallback || writeFile, isEmitBlocked, readFile: f => host.readFile(f), fileExists: f => { @@ -1914,6 +1944,17 @@ namespace ts { }; } + function writeFile( + fileName: string, + text: string, + writeByteOrderMark: boolean, + onError?: (message: string) => void, + sourceFiles?: readonly SourceFile[], + data?: WriteFileCallbackData + ) { + host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); + } + function emitBuildInfo(writeFileCallback?: WriteFileCallback): EmitResult { Debug.assert(!outFile(options)); tracing?.push(tracing.Phase.Emit, "emitBuildInfo", {}, /*separateBeginAndEnd*/ true); @@ -3074,8 +3115,8 @@ namespace ts { const fileName = toFileNameLowerCase(ref.fileName); setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); const mode = ref.resolutionMode || file.impliedNodeFormat; - if (mode && getEmitModuleResolutionKind(options) !== ModuleResolutionKind.Node12 && getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeNext) { - programDiagnostics.add(createDiagnosticForRange(file, ref, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext)); + if (mode && getEmitModuleResolutionKind(options) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeNext) { + programDiagnostics.add(createDiagnosticForRange(file, ref, Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext)); } processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: FileIncludeKind.TypeReferenceDirective, file: file.path, index, }); } @@ -3504,7 +3545,7 @@ namespace ts { if (options.resolveJsonModule) { if (getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeJs && - getEmitModuleResolutionKind(options) !== ModuleResolutionKind.Node12 && + getEmitModuleResolutionKind(options) !== ModuleResolutionKind.Node16 && getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeNext) { createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule"); } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 48ac670c8be..6cdcc6a26b9 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1210,11 +1210,13 @@ namespace ts { base64decode?(input: string): string; base64encode?(input: string): string; /*@internal*/ bufferFrom?(input: string, encoding?: string): Buffer; + /*@internal*/ require?(baseDir: string, moduleName: string): RequireResult; + /*@internal*/ defaultWatchFileKind?(): WatchFileKind | undefined; + // For testing /*@internal*/ now?(): Date; /*@internal*/ disableUseFileVersionAsSignature?: boolean; - /*@internal*/ require?(baseDir: string, moduleName: string): RequireResult; - /*@internal*/ defaultWatchFileKind?(): WatchFileKind | undefined; + /*@internal*/ storeFilesChangingSignatureDuringEmit?: boolean; } export interface FileWatcher { diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 7207d8a60d7..bfe70171504 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -9,7 +9,7 @@ namespace ts { return transformECMAScriptModule; case ModuleKind.System: return transformSystemModule; - case ModuleKind.Node12: + case ModuleKind.Node16: case ModuleKind.NodeNext: return transformNodeModule; default: diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 3ac842e8aba..cff2be7fb78 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -1294,7 +1294,7 @@ namespace ts { resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuper = 0; + let indexOfFirstStatementAfterSuperAndPrologue = 0; let prologueStatementCount = 0; let superStatementIndex = -1; let statements: Statement[] = []; @@ -1305,13 +1305,16 @@ namespace ts { // If there was a super call, visit existing statements up to and including it if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuper = superStatementIndex + 1; + indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; statements = [ ...statements.slice(0, prologueStatementCount), - ...visitNodes(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuper - prologueStatementCount), + ...visitNodes(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), ...statements.slice(prologueStatementCount), ]; } + else if (prologueStatementCount >= 0) { + indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; + } } if (needsSyntheticConstructor) { @@ -1354,26 +1357,25 @@ namespace ts { } } if (parameterPropertyDeclarationCount > 0) { - const parameterProperties = visitNodes(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuper, parameterPropertyDeclarationCount); + const parameterProperties = visitNodes(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue, parameterPropertyDeclarationCount); // If there was a super() call found, add parameter properties immediately after it if (superStatementIndex >= 0) { addRange(statements, parameterProperties); } - // If a synthetic super() call was added, add them just after it - else if (needsSyntheticConstructor) { + else { + // Add add parameter properties to the top of the constructor after the prologue + let superAndPrologueStatementCount = prologueStatementCount; + // If a synthetic super() call was added, need to account for that + if (needsSyntheticConstructor) superAndPrologueStatementCount++; statements = [ - statements[0], + ...statements.slice(0, superAndPrologueStatementCount), ...parameterProperties, - ...statements.slice(1), + ...statements.slice(superAndPrologueStatementCount), ]; } - // Since there wasn't a super() call, add them to the top of the constructor - else { - statements = [...parameterProperties, ...statements]; - } - indexOfFirstStatementAfterSuper += parameterPropertyDeclarationCount; + indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; } } } @@ -1385,7 +1387,7 @@ namespace ts { // Add existing statements after the initial prologues and super call if (constructor) { - addRange(statements, visitNodes(constructor.body!.statements, visitBodyStatement, isStatement, indexOfFirstStatementAfterSuper + prologueStatementCount)); + addRange(statements, visitNodes(constructor.body!.statements, visitBodyStatement, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); } statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment()); diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 3a3e237c5ea..0667cf386f7 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1140,6 +1140,9 @@ namespace ts { const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); errorFallbackNode = undefined; const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); + + preserveJsDoc(statement, input); + removeAllComments(input); return [statement, factory.updateExportAssignment(input, input.decorators, input.modifiers, newId)]; } } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 36a0f29d109..38ad28faacc 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1146,7 +1146,7 @@ namespace ts { [ ...existingPrologue, ...prologue, - ...(superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex)), + ...(superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), ...statements ] ), diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index e0825db6100..280ebfcd267 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -1896,7 +1896,7 @@ namespace ts { { createNewValue: (path, _input) => state.watchFile( path, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, ConfigFileProgramReloadLevel.Full), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, ConfigFileProgramReloadLevel.None), PollingInterval.High, parsed?.watchOptions, WatchType.PackageJson, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3a88c1b5c37..6becb6813ea 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3615,7 +3615,7 @@ namespace ts { languageVersion: ScriptTarget; /** - * When `module` is `Node12` or `NodeNext`, this field controls whether the + * When `module` is `Node16` or `NodeNext`, this field controls whether the * source file in question is an ESNext-output-format file, or a CommonJS-output-format * module. This is derived by the module resolver as it looks up the file, since * it is derived from either the file extension of the module, or the containing @@ -3856,12 +3856,16 @@ namespace ts { */ export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never }; + export interface WriteFileCallbackData { + /*@internal*/ sourceMapUrlPos?: number; + } export type WriteFileCallback = ( fileName: string, - data: string, + text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], + data?: WriteFileCallbackData, ) => void; export class OperationCanceledException { } @@ -4067,6 +4071,8 @@ namespace ts { * This implementation handles file exists to be true if file is source of project reference redirect when program is created using useSourceOfProjectReferenceRedirect */ /*@internal*/ fileExists(fileName: string): boolean; + /** Call compilerHost.writeFile on host program was created with */ + /*@internal*/ writeFile: WriteFileCallback; } /*@internal*/ @@ -6043,11 +6049,12 @@ namespace ts { Classic = 1, NodeJs = 2, // Starting with node12, node's module resolver has significant departures from traditional cjs resolution - // to better support ecmascript modules and their use within node - more features are still being added, so - // we can expect it to change over time, and as such, offer both a `NodeNext` moving resolution target, and a `Node12` - // version-anchored resolution target - Node12 = 3, - NodeNext = 99, // Not simply `Node12` so that compiled code linked against TS can use the `Next` value reliably (same as with `ModuleKind`) + // to better support ecmascript modules and their use within node - however more features are still being added. + // TypeScript's Node ESM support was introduced after Node 12 went end-of-life, and Node 14 is the earliest stable + // version that supports both pattern trailers - *but*, Node 16 is the first version that also supports ECMASCript 2022. + // In turn, we offer both a `NodeNext` moving resolution target, and a `Node16` version-anchored resolution target + Node16 = 3, + NodeNext = 99, // Not simply `Node16` so that compiled code linked against TS can use the `Next` value reliably (same as with `ModuleKind`) } export enum ModuleDetectionKind { @@ -6056,7 +6063,7 @@ namespace ts { */ Legacy = 1, /** - * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+ + * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ */ Auto = 2, /** @@ -6275,8 +6282,8 @@ namespace ts { ES2022 = 7, ESNext = 99, - // Node12+ is an amalgam of commonjs (albeit updated) and es2020+, and represents a distinct module system from es2020/esnext - Node12 = 100, + // Node16+ is an amalgam of commonjs (albeit updated) and es2022+, and represents a distinct module system from es2020/esnext + Node16 = 100, NodeNext = 199, } @@ -6710,6 +6717,8 @@ namespace ts { readonly resolvedModule: ResolvedModuleFull | undefined; /* @internal */ readonly failedLookupLocations: string[]; + /* @internal */ + readonly resolutionDiagnostics: Diagnostic[] } export interface ResolvedTypeReferenceDirective { @@ -6731,6 +6740,8 @@ namespace ts { export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; readonly failedLookupLocations: string[]; + /* @internal */ + resolutionDiagnostics: Diagnostic[] } /* @internal */ @@ -6782,6 +6793,7 @@ namespace ts { // For testing: /*@internal*/ disableUseFileVersionAsSignature?: boolean; + /*@internal*/ storeFilesChangingSignatureDuringEmit?: boolean; } /** true if --out otherwise source file name */ @@ -8463,7 +8475,7 @@ namespace ts { export interface ResolvedModuleSpecifierInfo { modulePaths: readonly ModulePath[] | undefined; moduleSpecifiers: readonly string[] | undefined; - isAutoImportable: boolean | undefined; + isBlockedByPackageJsonDependencies: boolean | undefined; } /* @internal */ @@ -8475,7 +8487,7 @@ namespace ts { export interface ModuleSpecifierCache { get(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions): Readonly | undefined; set(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[], moduleSpecifiers: readonly string[]): void; - setIsAutoImportable(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isAutoImportable: boolean): void; + setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isBlockedByPackageJsonDependencies: boolean): void; setModulePaths(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[]): void; clear(): void; count(): number; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index d44df87c458..3c38df36b44 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -656,10 +656,10 @@ namespace ts { AllowNumericSeparator = 1 << 3 } - export function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile, flags: GetLiteralTextFlags) { + export function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile | undefined, flags: GetLiteralTextFlags) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. - if (canUseOriginalText(node, flags)) { + if (sourceFile && canUseOriginalText(node, flags)) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } @@ -808,7 +808,7 @@ namespace ts { } function isCommonJSContainingModuleKind(kind: ModuleKind) { - return kind === ModuleKind.CommonJS || kind === ModuleKind.Node12 || kind === ModuleKind.NodeNext; + return kind === ModuleKind.CommonJS || kind === ModuleKind.Node16 || kind === ModuleKind.NodeNext; } export function isEffectiveExternalModule(node: SourceFile, compilerOptions: CompilerOptions) { @@ -4387,6 +4387,16 @@ namespace ts { Extension.Dts; } + /** + * This function is an inverse of `getDeclarationEmitExtensionForPath`. + */ + export function getPossibleOriginalInputExtensionForExtension(path: string) { + return fileExtensionIsOneOf(path, [Extension.Dmts, Extension.Mjs, Extension.Mts]) ? [Extension.Mts, Extension.Mjs] : + fileExtensionIsOneOf(path, [Extension.Dcts, Extension.Cjs, Extension.Cts]) ? [Extension.Cts, Extension.Cjs]: + fileExtensionIsOneOf(path, [`.json.d.ts`]) ? [Extension.Json] : + [Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js]; + } + export function outFile(options: CompilerOptions) { return options.outFile || options.out; } @@ -4459,10 +4469,10 @@ namespace ts { return combinePaths(newDirPath, sourceFilePath); } - export function writeFile(host: { writeFile: WriteFileCallback; }, diagnostics: DiagnosticCollection, fileName: string, data: string, writeByteOrderMark: boolean, sourceFiles?: readonly SourceFile[]) { - host.writeFile(fileName, data, writeByteOrderMark, hostErrorMessage => { + export function writeFile(host: { writeFile: WriteFileCallback; }, diagnostics: DiagnosticCollection, fileName: string, text: string, writeByteOrderMark: boolean, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) { + host.writeFile(fileName, text, writeByteOrderMark, hostErrorMessage => { diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }, sourceFiles); + }, sourceFiles, data); } function ensureDirectoriesExist( @@ -6319,7 +6329,7 @@ namespace ts { file.externalModuleIndicator = isFileProbablyExternalModule(file); }; case ModuleDetectionKind.Auto: - // If module is nodenext or node12, all esm format files are modules + // If module is nodenext or node16, all esm format files are modules // If jsx is react-jsx or react-jsxdev then jsx tags force module-ness // otherwise, the presence of import or export statments (or import.meta) implies module-ness const checks: ((file: SourceFile) => Node | true | undefined)[] = [isFileProbablyExternalModule]; @@ -6327,7 +6337,7 @@ namespace ts { checks.push(isFileModuleFromUsingJSXTag); } const moduleKind = getEmitModuleKind(options); - if (moduleKind === ModuleKind.Node12 || moduleKind === ModuleKind.NodeNext) { + if (moduleKind === ModuleKind.Node16 || moduleKind === ModuleKind.NodeNext) { checks.push(isFileForcedToBeModuleByFormat); } const combined = or(...checks); @@ -6338,7 +6348,7 @@ namespace ts { export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { return compilerOptions.target || - (compilerOptions.module === ModuleKind.Node12 && ScriptTarget.ES2020) || + (compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || ScriptTarget.ES3; } @@ -6356,8 +6366,8 @@ namespace ts { case ModuleKind.CommonJS: moduleResolution = ModuleResolutionKind.NodeJs; break; - case ModuleKind.Node12: - moduleResolution = ModuleResolutionKind.Node12; + case ModuleKind.Node16: + moduleResolution = ModuleResolutionKind.Node16; break; case ModuleKind.NodeNext: moduleResolution = ModuleResolutionKind.NodeNext; @@ -6382,7 +6392,7 @@ namespace ts { case ModuleKind.ES2020: case ModuleKind.ES2022: case ModuleKind.ESNext: - case ModuleKind.Node12: + case ModuleKind.Node16: case ModuleKind.NodeNext: return true; default: @@ -6407,7 +6417,7 @@ namespace ts { return compilerOptions.esModuleInterop; } switch (getEmitModuleKind(compilerOptions)) { - case ModuleKind.Node12: + case ModuleKind.Node16: case ModuleKind.NodeNext: return true; } diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index b2f7a0a3bc5..6c422d31f0c 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -573,6 +573,7 @@ namespace ts { createHash: maybeBind(host, host.createHash), readDirectory: maybeBind(host, host.readDirectory), disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature, + storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit, }; function writeFile(fileName: string, text: string, writeByteOrderMark: boolean, onError: (message: string) => void) { @@ -637,6 +638,7 @@ namespace ts { createHash: maybeBind(system, system.createHash), createProgram: createProgram || createEmitAndSemanticDiagnosticsBuilderProgram as any as CreateProgram, disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature, + storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit, }; } diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index 095c0f69a10..8af1397e19c 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -20,6 +20,7 @@ namespace ts { const host = createCompilerHostWorker(options, /*setParentNodes*/ undefined, system); host.createHash = maybeBind(system, system.createHash); host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature; + host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit; setGetSourceFileAsHashVersioned(host, system); changeCompilerHostLikeToUseCache(host, fileName => toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName)); return host; @@ -114,6 +115,7 @@ namespace ts { writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; // For testing disableUseFileVersionAsSignature?: boolean; + storeFilesChangingSignatureDuringEmit?: boolean; } export interface WatchCompilerHost extends ProgramHost, WatchHost { diff --git a/src/harness/client.ts b/src/harness/client.ts index 388f6473fa8..7c8869995bb 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -38,6 +38,7 @@ namespace ts.server { private lineMaps = new Map(); private messages: string[] = []; private lastRenameEntry: RenameEntry | undefined; + private preferences: UserPreferences | undefined; constructor(private host: SessionClientHost) { } @@ -124,6 +125,7 @@ namespace ts.server { /*@internal*/ configure(preferences: UserPreferences) { + this.preferences = preferences; const args: protocol.ConfigureRequestArguments = { preferences }; const request = this.processRequest(CommandNames.Configure, args); this.processResponse(request, /*expectEmptyBody*/ true); @@ -488,13 +490,25 @@ namespace ts.server { return notImplemented(); } - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[] { + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): RenameLocation[] { if (!this.lastRenameEntry || this.lastRenameEntry.inputs.fileName !== fileName || this.lastRenameEntry.inputs.position !== position || this.lastRenameEntry.inputs.findInStrings !== findInStrings || this.lastRenameEntry.inputs.findInComments !== findInComments) { - this.getRenameInfo(fileName, position, { allowRenameOfImportPath: true }, findInStrings, findInComments); + if (providePrefixAndSuffixTextForRename !== undefined) { + // User preferences have to be set through the `Configure` command + this.configure({ providePrefixAndSuffixTextForRename }); + // Options argument is not used, so don't pass in options + this.getRenameInfo(fileName, position, /*options*/{}, findInStrings, findInComments); + // Restore previous user preferences + if (this.preferences) { + this.configure(this.preferences); + } + } + else { + this.getRenameInfo(fileName, position, /*options*/{}, findInStrings, findInComments); + } } return this.lastRenameEntry!.locations; diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index 40e3994b1c9..999c9d4e273 100644 --- a/src/harness/compilerImpl.ts +++ b/src/harness/compilerImpl.ts @@ -249,7 +249,7 @@ namespace compiler { } // establish defaults (aligns with old harness) - if (compilerOptions.target === undefined && compilerOptions.module !== ts.ModuleKind.Node12 && compilerOptions.module !== ts.ModuleKind.NodeNext) compilerOptions.target = ts.ScriptTarget.ES3; + if (compilerOptions.target === undefined && compilerOptions.module !== ts.ModuleKind.Node16 && compilerOptions.module !== ts.ModuleKind.NodeNext) compilerOptions.target = ts.ScriptTarget.ES3; if (compilerOptions.newLine === undefined) compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed; if (compilerOptions.skipDefaultLibCheck === undefined) compilerOptions.skipDefaultLibCheck = true; if (compilerOptions.noErrorTruncation === undefined) compilerOptions.noErrorTruncation = true; diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts index b32bb785683..254ec1c7985 100644 --- a/src/harness/vfsUtil.ts +++ b/src/harness/vfsUtil.ts @@ -55,12 +55,12 @@ namespace vfs { } = {}; private _cwd: string; // current working directory - private _time: number | Date | (() => number | Date); + private _time: number; private _shadowRoot: FileSystem | undefined; private _dirStack: string[] | undefined; constructor(ignoreCase: boolean, options: FileSystemOptions = {}) { - const { time = -1, files, meta } = options; + const { time = ts.VirtualFS.timeIncrements, files, meta } = options; this.ignoreCase = ignoreCase; this.stringComparer = this.ignoreCase ? vpath.compareCaseInsensitive : vpath.compareCaseSensitive; this._time = time; @@ -167,16 +167,15 @@ namespace vfs { * * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html */ - public time(value?: number | Date | (() => number | Date)): number { - if (value !== undefined && this.isReadonly) throw createIOError("EPERM"); - let result = this._time; - if (typeof result === "function") result = result(); - if (typeof result === "object") result = result.getTime(); - if (result === -1) result = Date.now(); + public time(value?: number): number { if (value !== undefined) { + if (this.isReadonly) throw createIOError("EPERM"); this._time = value; } - return result; + else if (!this.isReadonly) { + this._time += ts.VirtualFS.timeIncrements; + } + return this._time; } /** @@ -843,7 +842,7 @@ namespace vfs { container[basename] = new Symlink(node.symlink); } else { - container[basename] = new File(node.buffer || ""); + container[basename] = new File(changed._getBuffer(node)); } return true; } @@ -1172,9 +1171,8 @@ namespace vfs { } export interface FileSystemOptions { - // Sets the initial timestamp for new files and directories, or the function used - // to calculate timestamps. - time?: number | Date | (() => number | Date); + // Sets the initial timestamp for new files and directories + time?: number; // A set of file system entries to initially add to the file system. files?: FileSet; diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index 0c1789aece4..a109884e8f8 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -229,6 +229,7 @@ interface Array { length: number; [n: number]: T; }` export class TestServerHost extends VirtualServerHost implements server.ServerHost { readonly screenClears: number[] = []; private readonly output: string[] = []; + constructor( public withSafeList: boolean, fileOrFolderorSymLinkList: readonly FileOrFolderOrSymLink[], diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index 50a10c7b33e..e13da87bc71 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -673,6 +673,7 @@ interface DataView { * Gets the BigInt64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; @@ -680,6 +681,7 @@ interface DataView { * Gets the BigUint64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; @@ -687,8 +689,7 @@ interface DataView { * Stores a BigInt64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; @@ -696,8 +697,7 @@ interface DataView { * Stores a BigUint64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index d4d0bf3ffa0..75b9539cc75 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -52,13 +52,13 @@ declare function decodeURIComponent(encodedURIComponent: string): string; /** * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an encoded URI. + * @param uri A value representing an unencoded URI. */ declare function encodeURI(uri: string): string; /** * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an encoded URI component. + * @param uriComponent A value representing an unencoded URI component. */ declare function encodeURIComponent(uriComponent: string | number | boolean): string; @@ -1669,6 +1669,7 @@ interface DataView { * Gets the Float32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getFloat32(byteOffset: number, littleEndian?: boolean): number; @@ -1676,6 +1677,7 @@ interface DataView { * Gets the Float64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getFloat64(byteOffset: number, littleEndian?: boolean): number; @@ -1690,12 +1692,14 @@ interface DataView { * Gets the Int16 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getInt16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Int32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getInt32(byteOffset: number, littleEndian?: boolean): number; @@ -1710,6 +1714,7 @@ interface DataView { * Gets the Uint16 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getUint16(byteOffset: number, littleEndian?: boolean): number; @@ -1717,6 +1722,7 @@ interface DataView { * Gets the Uint32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getUint32(byteOffset: number, littleEndian?: boolean): number; @@ -1724,8 +1730,7 @@ interface DataView { * Stores an Float32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1733,8 +1738,7 @@ interface DataView { * Stores an Float64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1749,8 +1753,7 @@ interface DataView { * Stores an Int16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1758,8 +1761,7 @@ interface DataView { * Stores an Int32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1774,8 +1776,7 @@ interface DataView { * Stores an Uint16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1783,8 +1784,7 @@ interface DataView { * Stores an Uint32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } diff --git a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl index 61a90c1c4d7..b20a7942045 100644 --- a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5349,18 +5349,6 @@ - - - - - - - - - - - - @@ -5997,6 +5985,15 @@ + + + + + + + + + @@ -13740,6 +13737,15 @@ + + + + + + + + + @@ -13977,15 +13983,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index 22eb8d6477c..f6b570fc6ff 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5349,18 +5349,6 @@ - - - - - - - - - - - - @@ -5997,6 +5985,15 @@ + + + + + + + + + @@ -13740,6 +13737,15 @@ + + + + + + + + + @@ -13977,15 +13983,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1647e0bb4d6..f614e8f1932 100644 --- a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5358,18 +5358,6 @@ - - - - - - - - - - - - @@ -6006,6 +5994,15 @@ + + + + + + + + + @@ -13749,6 +13746,15 @@ + + + + + + + + + @@ -13986,15 +13992,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl index c64af472bcb..33b4db6a78c 100644 --- a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5346,18 +5346,6 @@ - - - - - - - - - - - - @@ -5994,6 +5982,15 @@ + + + + + + + + + @@ -13734,6 +13731,15 @@ + + + + + + + + + @@ -13971,15 +13977,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl index b6c18f4a981..0892782e82d 100644 --- a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5361,18 +5361,6 @@ - - - - - - - - - - - - @@ -6009,6 +5997,15 @@ + + + + + + + + + @@ -13752,6 +13749,15 @@ + + + + + + + + + @@ -13989,15 +13995,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl index bd874578a99..e2263e2549d 100644 --- a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5361,18 +5361,6 @@ - - - - - - - - - - - - @@ -6009,6 +5997,15 @@ + + + + + + + + + @@ -13752,6 +13749,15 @@ + + + + + + + + + @@ -13989,15 +13995,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl index c626ecc1200..372de213b24 100644 --- a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5349,18 +5349,6 @@ - - - - - - - - - - - - @@ -5997,6 +5985,15 @@ + + + + + + + + + @@ -13740,6 +13737,15 @@ + + + + + + + + + @@ -13977,15 +13983,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl index beb4187452a..e222b1f13d7 100644 --- a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5349,18 +5349,6 @@ - - - - - - - - - - - - @@ -5997,6 +5985,15 @@ + + + + + + + + + @@ -13740,6 +13737,15 @@ + + + + + + + + + @@ -13977,15 +13983,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl index 76e9e04018e..fb0bd7b0c44 100644 --- a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5349,18 +5349,6 @@ - - - - - - - - - - - - @@ -5997,6 +5985,15 @@ + + + + + + + + + @@ -13740,6 +13737,15 @@ + + + + + + + + + @@ -13977,15 +13983,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1e9219f3e25..102654a92b6 100644 --- a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5339,18 +5339,6 @@ - - - - - - - - - - - - @@ -5987,6 +5975,15 @@ + + + + + + + + + @@ -13727,6 +13724,15 @@ + + + + + + + + + @@ -13964,15 +13970,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1508ab03620..303d5413039 100644 --- a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5342,18 +5342,6 @@ - - - - - - - - - - - - @@ -5990,6 +5978,15 @@ + + + + + + + + + @@ -13730,6 +13727,15 @@ + + + + + + + + + @@ -13967,15 +13973,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl index 5dfe3d58385..2e8bc37a128 100644 --- a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5348,18 +5348,6 @@ - - - - - - - - - - - - @@ -5996,6 +5984,15 @@ + + + + + + + + + @@ -13739,6 +13736,15 @@ + + + + + + + + + @@ -13976,15 +13982,6 @@ - - - - - - - - - diff --git a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 280067f85e8..9ae2836efbf 100644 --- a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -5342,18 +5342,6 @@ - - - - - - - - - - - - @@ -5990,6 +5978,15 @@ + + + + + + + + + @@ -13733,6 +13730,15 @@ + + + + + + + + + @@ -13970,15 +13976,6 @@ - - - - - - - - - diff --git a/src/server/moduleSpecifierCache.ts b/src/server/moduleSpecifierCache.ts index e5114fb6446..c4a26b3f80c 100644 --- a/src/server/moduleSpecifierCache.ts +++ b/src/server/moduleSpecifierCache.ts @@ -14,7 +14,7 @@ namespace ts.server { return cache.get(toFileName); }, set(fromFileName, toFileName, preferences, options, modulePaths, moduleSpecifiers) { - ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(modulePaths, moduleSpecifiers, /*isAutoImportable*/ true)); + ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(modulePaths, moduleSpecifiers, /*isBlockedByPackageJsonDependencies*/ false)); // If any module specifiers were generated based off paths in node_modules, // a package.json file in that package was read and is an input to the cached. @@ -43,17 +43,17 @@ namespace ts.server { info.modulePaths = modulePaths; } else { - cache.set(toFileName, createInfo(modulePaths, /*moduleSpecifiers*/ undefined, /*isAutoImportable*/ undefined)); + cache.set(toFileName, createInfo(modulePaths, /*moduleSpecifiers*/ undefined, /*isBlockedByPackageJsonDependencies*/ undefined)); } }, - setIsAutoImportable(fromFileName, toFileName, preferences, options, isAutoImportable) { + setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, isBlockedByPackageJsonDependencies) { const cache = ensureCache(fromFileName, preferences, options); const info = cache.get(toFileName); if (info) { - info.isAutoImportable = isAutoImportable; + info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies; } else { - cache.set(toFileName, createInfo(/*modulePaths*/ undefined, /*moduleSpecifiers*/ undefined, isAutoImportable)); + cache.set(toFileName, createInfo(/*modulePaths*/ undefined, /*moduleSpecifiers*/ undefined, isBlockedByPackageJsonDependencies)); } }, clear() { @@ -87,9 +87,9 @@ namespace ts.server { function createInfo( modulePaths: readonly ModulePath[] | undefined, moduleSpecifiers: readonly string[] | undefined, - isAutoImportable: boolean | undefined, + isBlockedByPackageJsonDependencies: boolean | undefined, ): ResolvedModuleSpecifierInfo { - return { modulePaths, moduleSpecifiers, isAutoImportable }; + return { modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies }; } } } diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 2b1ee6f004a..94c708779bb 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2433,6 +2433,7 @@ namespace ts.server.protocol { } export interface CompletionInfo { + readonly flags?: number; readonly isGlobalCompletion: boolean; readonly isMemberCompletion: boolean; readonly isNewIdentifierLocation: boolean; diff --git a/src/server/session.ts b/src/server/session.ts index 4979246368e..63fffcc0eec 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -317,6 +317,7 @@ namespace ts.server { projects, defaultProject, initialLocation, + /*isForRename*/ true, (project, location, tryAddToTodo) => { const projectOutputs = project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, providePrefixAndSuffixTextForRename); if (projectOutputs) { @@ -332,8 +333,8 @@ namespace ts.server { return outputs; } - function getDefinitionLocation(defaultProject: Project, initialLocation: DocumentPosition): DocumentPosition | undefined { - const infos = defaultProject.getLanguageService().getDefinitionAtPosition(initialLocation.fileName, initialLocation.pos); + function getDefinitionLocation(defaultProject: Project, initialLocation: DocumentPosition, isForRename: boolean): DocumentPosition | undefined { + const infos = defaultProject.getLanguageService().getDefinitionAtPosition(initialLocation.fileName, initialLocation.pos, /*searchOtherFilesOnly*/ false, isForRename); const info = infos && firstOrUndefined(infos); return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : undefined; } @@ -350,11 +351,12 @@ namespace ts.server { projects, defaultProject, initialLocation, + /*isForRename*/ false, (project, location, getMappedLocation) => { logger.info(`Finding references to ${location.fileName} position ${location.pos} in project ${project.getProjectName()}`); const projectOutputs = project.getLanguageService().findReferences(location.fileName, location.pos); if (projectOutputs) { - const clearIsDefinition = projectOutputs[0].references[0].isDefinition === undefined; + const clearIsDefinition = projectOutputs[0]?.references[0]?.isDefinition === undefined; for (const referencedSymbol of projectOutputs) { const mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(referencedSymbol.definition)); const definition: ReferencedSymbolDefinitionInfo = mappedDefinitionFile === undefined ? @@ -417,7 +419,8 @@ namespace ts.server { projects: Projects, defaultProject: Project, initialLocation: TLocation, - cb: CombineProjectOutputCallback + isForRename: boolean, + cb: CombineProjectOutputCallback, ): void { const projectService = defaultProject.projectService; let toDo: ProjectAndLocation[] | undefined; @@ -430,7 +433,7 @@ namespace ts.server { // After initial references are collected, go over every other project and see if it has a reference for the symbol definition. if (initialLocation) { - const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation); + const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename); if (defaultDefinition) { const getGeneratedDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : @@ -1247,7 +1250,7 @@ namespace ts.server { definitions?.forEach(d => definitionSet.add(d)); const noDtsProject = project.getNoDtsResolutionProject([file]); const ls = noDtsProject.getLanguageService(); - const jsDefinitions = ls.getDefinitionAtPosition(file, position, /*searchOtherFilesOnly*/ true) + const jsDefinitions = ls.getDefinitionAtPosition(file, position, /*searchOtherFilesOnly*/ true, /*stopAtAlias*/ false) ?.filter(d => toNormalizedPath(d.fileName) !== file); if (some(jsDefinitions)) { for (const jsDefinition of jsDefinitions) { @@ -1292,7 +1295,7 @@ namespace ts.server { const compilerOptions = project.getCompilationSettings(); const packageJson = getPackageScopeForPath(project.toPath(packageDirectory + "/package.json"), packageJsonCache, project, compilerOptions); if (!packageJson) return undefined; - // Use fake options instead of actual compiler options to avoid following export map if the project uses node12 or nodenext - + // Use fake options instead of actual compiler options to avoid following export map if the project uses node16 or nodenext - // Mapping from an export map entry across packages is out of scope for now. Returned entrypoints will only be what can be // resolved from the package root under --moduleResolution node const entrypoints = getEntrypointsFromPackageJsonInfo( @@ -1334,7 +1337,7 @@ namespace ts.server { if ((isStringLiteralLike(initialNode) || isIdentifier(initialNode)) && isAccessExpression(initialNode.parent)) { return forEachNameInAccessChainWalkingLeft(initialNode, nameInChain => { if (nameInChain === initialNode) return undefined; - const candidates = ls.getDefinitionAtPosition(file, nameInChain.getStart(), /*searchOtherFilesOnly*/ true) + const candidates = ls.getDefinitionAtPosition(file, nameInChain.getStart(), /*searchOtherFilesOnly*/ true, /*stopAtAlias*/ false) ?.filter(d => toNormalizedPath(d.fileName) !== file && d.isAmbient) .map(d => ({ fileName: d.fileName, diff --git a/src/services/codefixes/addMissingAwait.ts b/src/services/codefixes/addMissingAwait.ts index 1a9110227e5..d8b16cd4e54 100644 --- a/src/services/codefixes/addMissingAwait.ts +++ b/src/services/codefixes/addMissingAwait.ts @@ -17,7 +17,7 @@ namespace ts.codefix { Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined.code, Diagnostics.Type_0_is_not_an_array_type.code, Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code, - Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators.code, + Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code, Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code, diff --git a/src/services/codefixes/fixAddVoidToPromise.ts b/src/services/codefixes/fixAddVoidToPromise.ts index 5e6add96dac..b088f69594a 100644 --- a/src/services/codefixes/fixAddVoidToPromise.ts +++ b/src/services/codefixes/fixAddVoidToPromise.ts @@ -3,6 +3,7 @@ namespace ts.codefix { const fixName = "addVoidToPromise"; const fixId = "addVoidToPromise"; const errorCodes = [ + Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code, Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code ]; registerCodeFix({ diff --git a/src/services/codefixes/fixModuleAndTargetOptions.ts b/src/services/codefixes/fixModuleAndTargetOptions.ts index c2d72d291e3..e60b95f6c27 100644 --- a/src/services/codefixes/fixModuleAndTargetOptions.ts +++ b/src/services/codefixes/fixModuleAndTargetOptions.ts @@ -2,8 +2,8 @@ namespace ts.codefix { registerCodeFix({ errorCodes: [ - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { const compilerOptions = context.program.getCompilerOptions(); diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index f4e8b416f05..5f908020168 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -83,7 +83,7 @@ namespace ts.codefix { const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker)); const exportInfo = getAllReExportingModules(sourceFile, symbol, moduleSymbol, symbolName, /*isJsxTagName*/ false, host, program, preferences, useAutoImportProvider); const useRequire = shouldUseRequire(sourceFile, program); - const fix = getImportFixForSymbol(sourceFile, exportInfo, moduleSymbol, symbolName, program, /*position*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences); + const fix = getImportFixForSymbol(sourceFile, exportInfo, moduleSymbol, program, /*useNamespaceInfo*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences); if (fix) { addImport({ fixes: [fix], symbolName, errorIdentifierText: undefined }); } @@ -310,7 +310,7 @@ namespace ts.codefix { : getAllReExportingModules(sourceFile, targetSymbol, moduleSymbol, symbolName, isJsxTagName, host, program, preferences, /*useAutoImportProvider*/ true); const useRequire = shouldUseRequire(sourceFile, program); const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position)); - const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, symbolName, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences)); + const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, program, { symbolName, position }, isValidTypeOnlyUseSite, useRequire, host, preferences)); return { moduleSpecifier: fix.moduleSpecifier, codeAction: codeFixActionToCodeAction(codeActionForFix( @@ -331,10 +331,10 @@ namespace ts.codefix { return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName, fix, includeSymbolNameInDescription, QuotePreference.Double, compilerOptions)); } - function getImportFixForSymbol(sourceFile: SourceFile, exportInfos: readonly SymbolExportInfo[], moduleSymbol: Symbol, symbolName: string, program: Program, position: number | undefined, isValidTypeOnlyUseSite: boolean, useRequire: boolean, host: LanguageServiceHost, preferences: UserPreferences) { + function getImportFixForSymbol(sourceFile: SourceFile, exportInfos: readonly SymbolExportInfo[], moduleSymbol: Symbol, program: Program, useNamespaceInfo: { position: number, symbolName: string } | undefined, isValidTypeOnlyUseSite: boolean, useRequire: boolean, host: LanguageServiceHost, preferences: UserPreferences) { Debug.assert(exportInfos.some(info => info.moduleSymbol === moduleSymbol || info.symbol.parent === moduleSymbol), "Some exportInfo should match the specified moduleSymbol"); const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host); - return getBestFix(getImportFixes(exportInfos, symbolName, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences), sourceFile, program, packageJsonImportFilter, host); + return getBestFix(getImportFixes(exportInfos, useNamespaceInfo, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes, sourceFile, program, packageJsonImportFilter, host); } function codeFixActionToCodeAction({ description, changes, commands }: CodeFixAction): CodeAction { @@ -396,6 +396,9 @@ namespace ts.codefix { export function getModuleSpecifierForBestExportInfo( exportInfo: readonly SymbolExportInfo[], + symbolName: string, + position: number, + isValidTypeOnlyUseSite: boolean, importingFile: SourceFile, program: Program, host: LanguageServiceHost, @@ -403,13 +406,13 @@ namespace ts.codefix { packageJsonImportFilter?: PackageJsonImportFilter, fromCacheOnly?: boolean, ): { exportInfo?: SymbolExportInfo, moduleSpecifier: string, computedWithoutCacheCount: number } | undefined { - const { fixes, computedWithoutCacheCount } = getNewImportFixes( + const { fixes, computedWithoutCacheCount } = getImportFixes( + exportInfo, + { symbolName, position }, + isValidTypeOnlyUseSite, + /*useRequire*/ false, program, importingFile, - /*position*/ undefined, - /*isValidTypeOnlyUseSite*/ false, - /*useRequire*/ false, - exportInfo, host, preferences, fromCacheOnly); @@ -419,23 +422,46 @@ namespace ts.codefix { function getImportFixes( exportInfos: readonly SymbolExportInfo[], - symbolName: string, + useNamespaceInfo: { + symbolName: string, + position: number, + } | undefined, /** undefined only for missing JSX namespace */ - position: number | undefined, isValidTypeOnlyUseSite: boolean, useRequire: boolean, program: Program, sourceFile: SourceFile, host: LanguageServiceHost, preferences: UserPreferences, - ): readonly ImportFixWithModuleSpecifier[] { + fromCacheOnly?: boolean, + ): { computedWithoutCacheCount: number, fixes: readonly ImportFixWithModuleSpecifier[] } { const checker = program.getTypeChecker(); const existingImports = flatMap(exportInfos, info => getExistingImportDeclarations(info, checker, sourceFile, program.getCompilerOptions())); - const useNamespace = position === undefined ? undefined : tryUseExistingNamespaceImport(existingImports, symbolName, position, checker); + const useNamespace = useNamespaceInfo && tryUseExistingNamespaceImport(existingImports, useNamespaceInfo.symbolName, useNamespaceInfo.position, checker); const addToExisting = tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, program.getCompilerOptions()); - // Don't bother providing an action to add a new import if we can add to an existing one. - const addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, host, preferences); - return [...(useNamespace ? [useNamespace] : emptyArray), ...addImport]; + if (addToExisting) { + // Don't bother providing an action to add a new import if we can add to an existing one. + return { + computedWithoutCacheCount: 0, + fixes: [...(useNamespace ? [useNamespace] : emptyArray), addToExisting], + }; + } + + const { fixes, computedWithoutCacheCount = 0 } = getFixesForAddImport( + exportInfos, + existingImports, + program, + sourceFile, + useNamespaceInfo?.position, + isValidTypeOnlyUseSite, + useRequire, + host, + preferences, + fromCacheOnly); + return { + computedWithoutCacheCount, + fixes: [...(useNamespace ? [useNamespace] : emptyArray), ...fixes], + }; } function tryUseExistingNamespaceImport(existingImports: readonly FixAddToExistingImportInfo[], symbolName: string, position: number, checker: TypeChecker): FixUseNamespaceImport | undefined { @@ -618,6 +644,7 @@ namespace ts.codefix { const compilerOptions = program.getCompilerOptions(); const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host); const getChecker = memoizeOne((isFromPackageJson: boolean) => isFromPackageJson ? host.getPackageJsonAutoImportProvider!()!.getTypeChecker() : program.getTypeChecker()); + const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(getEmitModuleResolutionKind(compilerOptions)); const getModuleSpecifiers = fromCacheOnly ? (moduleSymbol: Symbol) => ({ moduleSpecifiers: moduleSpecifiers.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol: Symbol, checker: TypeChecker) => moduleSpecifiers.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences); @@ -629,19 +656,19 @@ namespace ts.codefix { const importedSymbolHasValueMeaning = !!(exportInfo.targetFlags & SymbolFlags.Value); const addAsTypeOnly = getAddAsTypeOnly(isValidTypeOnlyUseSite, /*isForNewImportDeclaration*/ true, exportInfo.symbol, exportInfo.targetFlags, checker, compilerOptions); computedWithoutCacheCount += computedWithoutCache ? 1 : 0; - return moduleSpecifiers?.map((moduleSpecifier): FixAddNewImport | FixAddJsdocTypeImport => + return mapDefined(moduleSpecifiers, (moduleSpecifier): FixAddNewImport | FixAddJsdocTypeImport | undefined => + rejectNodeModulesRelativePaths && pathContainsNodeModules(moduleSpecifier) ? undefined : // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. - !importedSymbolHasValueMeaning && isJs && position !== undefined - ? { kind: ImportFixKind.JsdocTypeImport, moduleSpecifier, position, exportInfo, isReExport: i > 0 } - : { - kind: ImportFixKind.AddNew, - moduleSpecifier, - importKind: getImportKind(sourceFile, exportInfo.exportKind, compilerOptions), - useRequire, - addAsTypeOnly, - exportInfo, - isReExport: i > 0, - } + !importedSymbolHasValueMeaning && isJs && position !== undefined ? { kind: ImportFixKind.JsdocTypeImport, moduleSpecifier, position, exportInfo, isReExport: i > 0 } : + { + kind: ImportFixKind.AddNew, + moduleSpecifier, + importKind: getImportKind(sourceFile, exportInfo.exportKind, compilerOptions), + useRequire, + addAsTypeOnly, + exportInfo, + isReExport: i > 0, + } ); }); @@ -658,9 +685,10 @@ namespace ts.codefix { useRequire: boolean, host: LanguageServiceHost, preferences: UserPreferences, - ): readonly (FixAddNewImport | FixAddJsdocTypeImport)[] { + fromCacheOnly?: boolean, + ): { computedWithoutCacheCount?: number, fixes: readonly (FixAddNewImport | FixAddJsdocTypeImport)[] } { const existingDeclaration = firstDefined(existingImports, info => newImportInfoFromExistingSpecifier(info, isValidTypeOnlyUseSite, useRequire, program.getTypeChecker(), program.getCompilerOptions())); - return existingDeclaration ? [existingDeclaration] : getNewImportFixes(program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, exportInfos, host, preferences).fixes; + return existingDeclaration ? { fixes: [existingDeclaration] } : getNewImportFixes(program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, exportInfos, host, preferences, fromCacheOnly); } function newImportInfoFromExistingSpecifier( @@ -782,7 +810,8 @@ namespace ts.codefix { const symbolName = umdSymbol.name; const exportInfo: readonly SymbolExportInfo[] = [{ symbol: umdSymbol, moduleSymbol: symbol, moduleFileName: undefined, exportKind: ExportKind.UMD, targetFlags: symbol.flags, isFromPackageJson: false }]; const useRequire = shouldUseRequire(sourceFile, program); - const fixes = getImportFixes(exportInfo, symbolName, isIdentifier(token) ? token.getStart(sourceFile) : undefined, /*isValidTypeOnlyUseSite*/ false, useRequire, program, sourceFile, host, preferences); + const position = isIdentifier(token) ? token.getStart(sourceFile) : undefined; + const fixes = getImportFixes(exportInfo, position ? { position, symbolName } : undefined, /*isValidTypeOnlyUseSite*/ false, useRequire, program, sourceFile, host, preferences).fixes; return { fixes, symbolName, errorIdentifierText: tryCast(token, isIdentifier)?.text }; } function getUmdSymbol(token: Node, checker: TypeChecker): Symbol | undefined { @@ -835,7 +864,7 @@ namespace ts.codefix { case ModuleKind.None: // Fall back to the `import * as ns` style import. return ImportKind.Namespace; - case ModuleKind.Node12: + case ModuleKind.Node16: case ModuleKind.NodeNext: return importingFile.impliedNodeFormat === ModuleKind.ESNext ? ImportKind.Namespace : ImportKind.CommonJS; default: @@ -855,7 +884,7 @@ namespace ts.codefix { const useRequire = shouldUseRequire(sourceFile, program); const exportInfo = getExportInfos(symbolName, isJSXTagName(symbolToken), getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences); const fixes = arrayFrom(flatMapIterator(exportInfo.entries(), ([_, exportInfos]) => - getImportFixes(exportInfos, symbolName, symbolToken.getStart(sourceFile), isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences))); + getImportFixes(exportInfos, { symbolName, position: symbolToken.getStart(sourceFile) }, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes)); return { fixes, symbolName, errorIdentifierText: symbolToken.text }; } diff --git a/src/services/completions.ts b/src/services/completions.ts index 1f1007f2f61..27066f7b72e 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -164,71 +164,86 @@ namespace ts.Completions { TypeAssertionKeywords, TypeKeywords, TypeKeyword, // Literally just `type` - Last = TypeKeywords + Last = TypeKeyword } const enum GlobalsSearch { Continue, Success, Fail } interface ModuleSpecifierResolutioContext { - tryResolve: (exportInfo: readonly SymbolExportInfo[], isFromAmbientModule: boolean) => ModuleSpecifierResolutionResult | undefined; - resolutionLimitExceeded: () => boolean; + tryResolve: (exportInfo: readonly SymbolExportInfo[], symbolName: string, isFromAmbientModule: boolean) => ModuleSpecifierResolutionResult; + resolvedAny: () => boolean; + skippedAny: () => boolean; + resolvedBeyondLimit: () => boolean; } - interface ModuleSpecifierResolutionResult { + type ModuleSpecifierResolutionResult = "skipped" | "failed" | { exportInfo?: SymbolExportInfo; moduleSpecifier: string; - } + }; function resolvingModuleSpecifiers( logPrefix: string, host: LanguageServiceHost, program: Program, sourceFile: SourceFile, + position: number, preferences: UserPreferences, isForImportStatementCompletion: boolean, + isValidTypeOnlyUseSite: boolean, cb: (context: ModuleSpecifierResolutioContext) => TReturn, ): TReturn { const start = timestamp(); const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host); - let resolutionLimitExceeded = false; + // Under `--moduleResolution nodenext`, we have to resolve module specifiers up front, because + // package.json exports can mean we *can't* resolve a module specifier (that doesn't include a + // relative path into node_modules), and we want to filter those completions out entirely. + // Import statement completions always need specifier resolution because the module specifier is + // part of their `insertText`, not the `codeActions` creating edits away from the cursor. + const needsFullResolution = isForImportStatementCompletion || moduleResolutionRespectsExports(getEmitModuleResolutionKind(program.getCompilerOptions())); + let skippedAny = false; let ambientCount = 0; let resolvedCount = 0; let resolvedFromCacheCount = 0; let cacheAttemptCount = 0; - const result = cb({ tryResolve, resolutionLimitExceeded: () => resolutionLimitExceeded }); + const result = cb({ + tryResolve, + skippedAny: () => skippedAny, + resolvedAny: () => resolvedCount > 0, + resolvedBeyondLimit: () => resolvedCount > moduleSpecifierResolutionLimit, + }); const hitRateMessage = cacheAttemptCount ? ` (${(resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1)}% hit rate)` : ""; host.log?.(`${logPrefix}: resolved ${resolvedCount} module specifiers, plus ${ambientCount} ambient and ${resolvedFromCacheCount} from cache${hitRateMessage}`); - host.log?.(`${logPrefix}: response is ${resolutionLimitExceeded ? "incomplete" : "complete"}`); + host.log?.(`${logPrefix}: response is ${skippedAny ? "incomplete" : "complete"}`); host.log?.(`${logPrefix}: ${timestamp() - start}`); return result; - function tryResolve(exportInfo: readonly SymbolExportInfo[], isFromAmbientModule: boolean): ModuleSpecifierResolutionResult | undefined { + function tryResolve(exportInfo: readonly SymbolExportInfo[], symbolName: string, isFromAmbientModule: boolean): ModuleSpecifierResolutionResult { if (isFromAmbientModule) { - const result = codefix.getModuleSpecifierForBestExportInfo(exportInfo, sourceFile, program, host, preferences); + const result = codefix.getModuleSpecifierForBestExportInfo(exportInfo, symbolName, position, isValidTypeOnlyUseSite, sourceFile, program, host, preferences); if (result) { ambientCount++; } - return result; + return result || "failed"; } - const shouldResolveModuleSpecifier = isForImportStatementCompletion || preferences.allowIncompleteCompletions && resolvedCount < moduleSpecifierResolutionLimit; + const shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions && resolvedCount < moduleSpecifierResolutionLimit; const shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncompleteCompletions && cacheAttemptCount < moduleSpecifierResolutionCacheAttemptLimit; const result = (shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache) - ? codefix.getModuleSpecifierForBestExportInfo(exportInfo, sourceFile, program, host, preferences, packageJsonImportFilter, shouldGetModuleSpecifierFromCache) + ? codefix.getModuleSpecifierForBestExportInfo(exportInfo, symbolName, position, isValidTypeOnlyUseSite, sourceFile, program, host, preferences, packageJsonImportFilter, shouldGetModuleSpecifierFromCache) : undefined; if (!shouldResolveModuleSpecifier && !shouldGetModuleSpecifierFromCache || shouldGetModuleSpecifierFromCache && !result) { - resolutionLimitExceeded = true; + skippedAny = true; } resolvedCount += result?.computedWithoutCacheCount || 0; - resolvedFromCacheCount += exportInfo.length - resolvedCount; + resolvedFromCacheCount += exportInfo.length - (result?.computedWithoutCacheCount || 0); if (shouldGetModuleSpecifierFromCache) { cacheAttemptCount++; } - return result; + return result || (needsFullResolution ? "failed" : "skipped"); } } @@ -358,8 +373,10 @@ namespace ts.Completions { host, program, file, + location.getStart(), preferences, /*isForImportStatementCompletion*/ false, + isValidTypeOnlyAliasUseSite(location), context => { const entries = mapDefined(previousResponse.entries, entry => { if (!entry.hasAction || !entry.source || !entry.data || completionEntryDataIsResolved(entry.data)) { @@ -374,8 +391,12 @@ namespace ts.Completions { const { origin } = Debug.checkDefined(getAutoImportSymbolFromCompletionEntryData(entry.name, entry.data, program, host)); const info = exportMap.get(file.path, entry.data.exportMapKey); - const result = info && context.tryResolve(info, !isExternalModuleNameRelative(stripQuotes(origin.moduleSymbol.name))); - if (!result) return entry; + const result = info && context.tryResolve(info, entry.name, !isExternalModuleNameRelative(stripQuotes(origin.moduleSymbol.name))); + if (result === "skipped") return entry; + if (!result || result === "failed") { + host.log?.(`Unexpected failure resolving auto import for '${entry.name}' from '${entry.source}'`); + return undefined; + } const newOrigin: SymbolOriginInfoResolvedExport = { ...origin, @@ -390,7 +411,7 @@ namespace ts.Completions { return entry; }); - if (!context.resolutionLimitExceeded()) { + if (!context.skippedAny()) { previousResponse.isIncomplete = undefined; } @@ -399,6 +420,7 @@ namespace ts.Completions { ); previousResponse.entries = newEntries; + previousResponse.flags = (previousResponse.flags || 0) | CompletionInfoFlags.IsContinuation; return previousResponse; } @@ -552,7 +574,7 @@ namespace ts.Completions { if (keywordFilters !== KeywordCompletionFilters.None) { const entryNames = new Set(entries.map(e => e.name)); for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) { - if (!entryNames.has(keywordEntry.name)) { + if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)!) || !entryNames.has(keywordEntry.name)) { insertSorted(entries, keywordEntry, compareCompletionEntries, /*allowDuplicates*/ true); } } @@ -570,12 +592,13 @@ namespace ts.Completions { } return { + flags: completionData.flags, isGlobalCompletion: isInSnippetScope, isIncomplete: preferences.allowIncompleteCompletions && hasUnresolvedAutoImports ? true : undefined, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation, optionalReplacementSpan: getOptionalReplacementSpan(location), - entries + entries, }; } @@ -1199,18 +1222,19 @@ namespace ts.Completions { function createSnippetPrinter( printerOptions: PrinterOptions, ) { + let escapes: TextChange[] | undefined; const baseWriter = textChanges.createWriter(getNewLineCharacter(printerOptions)); const printer = createPrinter(printerOptions, baseWriter); const writer: EmitTextWriter = { ...baseWriter, - write: s => baseWriter.write(escapeSnippetText(s)), + write: s => escapingWrite(s, () => baseWriter.write(s)), nonEscapingWrite: baseWriter.write, - writeLiteral: s => baseWriter.writeLiteral(escapeSnippetText(s)), - writeStringLiteral: s => baseWriter.writeStringLiteral(escapeSnippetText(s)), - writeSymbol: (s, symbol) => baseWriter.writeSymbol(escapeSnippetText(s), symbol), - writeParameter: s => baseWriter.writeParameter(escapeSnippetText(s)), - writeComment: s => baseWriter.writeComment(escapeSnippetText(s)), - writeProperty: s => baseWriter.writeProperty(escapeSnippetText(s)), + writeLiteral: s => escapingWrite(s, () => baseWriter.writeLiteral(s)), + writeStringLiteral: s => escapingWrite(s, () => baseWriter.writeStringLiteral(s)), + writeSymbol: (s, symbol) => escapingWrite(s, () => baseWriter.writeSymbol(s, symbol)), + writeParameter: s => escapingWrite(s, () => baseWriter.writeParameter(s)), + writeComment: s => escapingWrite(s, () => baseWriter.writeComment(s)), + writeProperty: s => escapingWrite(s, () => baseWriter.writeProperty(s)), }; return { @@ -1218,12 +1242,39 @@ namespace ts.Completions { printAndFormatSnippetList, }; + // The formatter/scanner will have issues with snippet-escaped text, + // so instead of writing the escaped text directly to the writer, + // generate a set of changes that can be applied to the unescaped text + // to escape it post-formatting. + function escapingWrite(s: string, write: () => void) { + const escaped = escapeSnippetText(s); + if (escaped !== s) { + const start = baseWriter.getTextPos(); + write(); + const end = baseWriter.getTextPos(); + escapes = append(escapes ||= [], { newText: escaped, span: { start, length: end - start } }); + } + else { + write(); + } + } + /* Snippet-escaping version of `printer.printList`. */ function printSnippetList( format: ListFormat, list: NodeArray, sourceFile: SourceFile | undefined, ): string { + const unescaped = printUnescapedSnippetList(format, list, sourceFile); + return escapes ? textChanges.applyChanges(unescaped, escapes) : unescaped; + } + + function printUnescapedSnippetList( + format: ListFormat, + list: NodeArray, + sourceFile: SourceFile | undefined, + ): string { + escapes = undefined; writer.clear(); printer.writeList(format, list, sourceFile, writer); return writer.getText(); @@ -1236,7 +1287,7 @@ namespace ts.Completions { formatContext: formatting.FormatContext, ): string { const syntheticFile = { - text: printSnippetList( + text: printUnescapedSnippetList( format, list, sourceFile), @@ -1256,7 +1307,11 @@ namespace ts.Completions { /* delta */ 0, { ...formatContext, options: formatOptions }); }); - return textChanges.applyChanges(syntheticFile.text, changes); + + const allChanges = escapes + ? stableSort(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) + : changes; + return textChanges.applyChanges(syntheticFile.text, allChanges); } } @@ -1805,6 +1860,7 @@ namespace ts.Completions { readonly isRightOfOpenTag: boolean; readonly importCompletionNode?: Node; readonly hasUnresolvedAutoImports?: boolean; + readonly flags: CompletionInfoFlags; } type Request = | { readonly kind: CompletionDataKind.JsDocTagName | CompletionDataKind.JsDocTag } @@ -1989,6 +2045,7 @@ namespace ts.Completions { let location = getTouchingPropertyName(sourceFile, position); let keywordFilters = KeywordCompletionFilters.None; let isNewIdentifierLocation = false; + let flags = CompletionInfoFlags.None; if (contextToken) { const importStatementCompletion = getImportStatementCompletionInfo(contextToken); @@ -2009,6 +2066,7 @@ namespace ts.Completions { // is not backward compatible with older clients, the language service defaults to disabling it, allowing newer clients // to opt in with the `includeCompletionsForImportStatements` user preference. importCompletionNode = importStatementCompletion.replacementNode; + flags |= CompletionInfoFlags.IsImportStatementCompletion; } // Bail out if this is a known invalid completion location if (!importCompletionNode && isCompletionListBlocker(contextToken)) { @@ -2216,6 +2274,7 @@ namespace ts.Completions { isRightOfOpenTag, importCompletionNode, hasUnresolvedAutoImports, + flags, }; type JSDocTagWithTypeExpression = JSDocParameterTag | JSDocPropertyTag | JSDocReturnTag | JSDocTypeTag | JSDocTypedefTag | JSDocTemplateTag; @@ -2396,7 +2455,7 @@ namespace ts.Completions { moduleSymbol, symbol: firstAccessibleSymbol, targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags, - }], sourceFile, program, host, preferences) || {}; + }], firstAccessibleSymbol.name, position, isValidTypeOnlyAliasUseSite(location), sourceFile, program, host, preferences) || {}; if (moduleSpecifier) { const origin: SymbolOriginInfoResolvedExport = { @@ -2656,6 +2715,7 @@ namespace ts.Completions { return; } + flags |= CompletionInfoFlags.MayIncludeAutoImports; // import { type | -> token text should be blank const isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken && importCompletionNode @@ -2675,8 +2735,10 @@ namespace ts.Completions { host, program, sourceFile, + position, preferences, !!importCompletionNode, + isValidTypeOnlyAliasUseSite(location), context => { exportInfo.search( sourceFile.path, @@ -2698,14 +2760,34 @@ namespace ts.Completions { return; } - const defaultExportInfo = find(info, isImportableExportInfo); - if (!defaultExportInfo) { + // Do a relatively cheap check to bail early if all re-exports are non-importable + // due to file location or package.json dependency filtering. For non-node16+ + // module resolution modes, getting past this point guarantees that we'll be + // able to generate a suitable module specifier, so we can safely show a completion, + // even if we defer computing the module specifier. + const firstImportableExportInfo = find(info, isImportableExportInfo); + if (!firstImportableExportInfo) { return; } - // If we don't need to resolve module specifiers, we can use any re-export that is importable at all - // (We need to ensure that at least one is importable to show a completion.) - const { exportInfo = defaultExportInfo, moduleSpecifier } = context.tryResolve(info, isFromAmbientModule) || {}; + // In node16+, module specifier resolution can fail due to modules being blocked + // by package.json `exports`. If that happens, don't show a completion item. + // N.B. in this resolution mode we always try to resolve module specifiers here, + // because we have to know now if it's going to fail so we can omit the completion + // from the list. + const result = context.tryResolve(info, symbolName, isFromAmbientModule) || {}; + if (result === "failed") return; + + // If we skipped resolving module specifiers, our selection of which ExportInfo + // to use here is arbitrary, since the info shown in the completion list derived from + // it should be identical regardless of which one is used. During the subsequent + // `CompletionEntryDetails` request, we'll get all the ExportInfos again and pick + // the best one based on the module specifier it produces. + let exportInfo = firstImportableExportInfo, moduleSpecifier; + if (result !== "skipped") { + ({ exportInfo = firstImportableExportInfo, moduleSpecifier } = result); + } + const isDefaultExport = exportInfo.exportKind === ExportKind.Default; const symbol = isDefaultExport && getLocalSymbolForExportDefault(exportInfo.symbol) || exportInfo.symbol; @@ -2723,7 +2805,9 @@ namespace ts.Completions { } ); - hasUnresolvedAutoImports = context.resolutionLimitExceeded(); + hasUnresolvedAutoImports = context.skippedAny(); + flags |= context.resolvedAny() ? CompletionInfoFlags.ResolvedModuleSpecifiers : 0; + flags |= context.resolvedBeyondLimit() ? CompletionInfoFlags.ResolvedModuleSpecifiersBeyondLimit : 0; } ); @@ -2793,6 +2877,7 @@ namespace ts.Completions { return; } const origin: SymbolOriginInfoObjectLiteralMethod = { kind: SymbolOriginInfoKind.ObjectLiteralMethod, ...entryProps }; + flags |= CompletionInfoFlags.MayIncludeMethodSnippets; symbolToOriginInfoMap[symbols.length] = origin; symbols.push(member); }); @@ -3024,7 +3109,7 @@ namespace ts.Completions { // through type declaration or inference. // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed - // type of parameter will flow in from the contextual type of the function - let canGetType = hasInitializer(rootDeclaration) || hasType(rootDeclaration) || rootDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement; + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement; if (!canGetType && rootDeclaration.kind === SyntaxKind.Parameter) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent as Expression); diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts index ffcec349cc6..698f82eda51 100644 --- a/src/services/documentHighlights.ts +++ b/src/services/documentHighlights.ts @@ -93,6 +93,8 @@ namespace ts { return highlightSpans(getAsyncAndAwaitOccurrences(node)); case SyntaxKind.YieldKeyword: return highlightSpans(getYieldOccurrences(node)); + case SyntaxKind.InKeyword: + return undefined; default: return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) diff --git a/src/services/documentRegistry.ts b/src/services/documentRegistry.ts index 5274aed06fd..7141bc12fd7 100644 --- a/src/services/documentRegistry.ts +++ b/src/services/documentRegistry.ts @@ -25,7 +25,7 @@ namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. Only used if the file was not found * in the registry and a new one was created. @@ -58,7 +58,7 @@ namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. * @param version Current version of the file. diff --git a/src/services/exportInfoMap.ts b/src/services/exportInfoMap.ts index 4004815a4a6..e8b52d48122 100644 --- a/src/services/exportInfoMap.ts +++ b/src/services/exportInfoMap.ts @@ -291,8 +291,8 @@ namespace ts { ): boolean { if (from === to) return false; const cachedResult = moduleSpecifierCache?.get(from.path, to.path, preferences, {}); - if (cachedResult?.isAutoImportable !== undefined) { - return cachedResult.isAutoImportable; + if (cachedResult?.isBlockedByPackageJsonDependencies !== undefined) { + return !cachedResult.isBlockedByPackageJsonDependencies; } const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost); @@ -313,7 +313,7 @@ namespace ts { if (packageJsonFilter) { const isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost); - moduleSpecifierCache?.setIsAutoImportable(from.path, to.path, preferences, {}, isAutoImportable); + moduleSpecifierCache?.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable); return isAutoImportable; } @@ -381,38 +381,45 @@ namespace ts { host.log?.("getExportInfoMap: cache miss or empty; calculating new results"); const compilerOptions = program.getCompilerOptions(); let moduleCount = 0; - forEachExternalModuleToImportFrom(program, host, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => { - if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested(); - const seenExports = new Map<__String, true>(); - const checker = program.getTypeChecker(); - const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); - // Note: I think we shouldn't actually see resolved module symbols here, but weird merges - // can cause it to happen: see 'completionsImport_mergedReExport.ts' - if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) { - cache.add( - importingFile.path, - defaultInfo.symbol, - defaultInfo.exportKind === ExportKind.Default ? InternalSymbolName.Default : InternalSymbolName.ExportEquals, - moduleSymbol, - moduleFile, - defaultInfo.exportKind, - isFromPackageJson, - checker); - } - checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => { - if (exported !== defaultInfo?.symbol && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) { + try { + forEachExternalModuleToImportFrom(program, host, /*useAutoImportProvider*/ true, (moduleSymbol, moduleFile, program, isFromPackageJson) => { + if (++moduleCount % 100 === 0) cancellationToken?.throwIfCancellationRequested(); + const seenExports = new Map<__String, true>(); + const checker = program.getTypeChecker(); + const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); + // Note: I think we shouldn't actually see resolved module symbols here, but weird merges + // can cause it to happen: see 'completionsImport_mergedReExport.ts' + if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) { cache.add( importingFile.path, - exported, - key, + defaultInfo.symbol, + defaultInfo.exportKind === ExportKind.Default ? InternalSymbolName.Default : InternalSymbolName.ExportEquals, moduleSymbol, moduleFile, - ExportKind.Named, + defaultInfo.exportKind, isFromPackageJson, checker); } + checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => { + if (exported !== defaultInfo?.symbol && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) { + cache.add( + importingFile.path, + exported, + key, + moduleSymbol, + moduleFile, + ExportKind.Named, + isFromPackageJson, + checker); + } + }); }); - }); + } + catch (err) { + // Ensure cache is reset if operation is cancelled + cache.clear(); + throw err; + } host.log?.(`getExportInfoMap: done in ${timestamp() - start} ms`); return cache; diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 5a9948cd35f..b3e84023d17 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -691,6 +691,10 @@ namespace ts.formatting { isListItem: boolean, isFirstListItem?: boolean): number { + if (nodeIsMissing(child)) { + return inheritedIndentation; + } + const childStartPos = child.getStart(sourceFile); const childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line; @@ -778,6 +782,13 @@ namespace ts.formatting { let listDynamicIndentation = parentDynamicIndentation; let startLine = parentStartLine; + // node range is outside the target range - do not dive inside + if (!rangeOverlapsWithStartEnd(originalRange, nodes.pos, nodes.end)) { + if (nodes.end < originalRange.pos) { + formattingScanner.skipToEndOf(nodes); + } + return; + } if (listStartToken !== SyntaxKind.Unknown) { // introduce a new indentation scope for lists (including list start and end tokens) diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 05bbc340416..56ad87770ba 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -12,7 +12,7 @@ namespace ts.formatting { readEOFTokenRange(): TextRangeWithKind; getCurrentLeadingTrivia(): TextRangeWithKind[] | undefined; lastTrailingTriviaWasNewLine(): boolean; - skipToEndOf(node: Node): void; + skipToEndOf(node: Node | NodeArray): void; skipToStartOf(node: Node): void; } @@ -286,7 +286,7 @@ namespace ts.formatting { return tokenInfo; } - function skipToEndOf(node: Node): void { + function skipToEndOf(node: Node | NodeArray): void { scanner.setTextPos(node.end); savedPos = scanner.getStartPos(); lastScanAction = undefined; diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index b1c8ec28c1b..f9f742e65a4 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -1,6 +1,6 @@ /* @internal */ namespace ts.GoToDefinition { - export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number, searchOtherFilesOnly?: boolean): readonly DefinitionInfo[] | undefined { + export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number, searchOtherFilesOnly?: boolean, stopAtAlias?: boolean): readonly DefinitionInfo[] | undefined { const resolvedRef = getReferenceAtPosition(sourceFile, position, program); const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray; if (resolvedRef?.file) { @@ -28,7 +28,7 @@ namespace ts.GoToDefinition { if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) { const classDecl = node.parent.parent; - const { symbol, failedAliasResolution } = getSymbol(classDecl, typeChecker); + const { symbol, failedAliasResolution } = getSymbol(classDecl, typeChecker, stopAtAlias); const staticBlocks = filter(classDecl.members, isClassStaticBlockDeclaration); const containerName = symbol ? typeChecker.symbolToString(symbol, classDecl) : ""; @@ -40,7 +40,7 @@ namespace ts.GoToDefinition { }); } - let { symbol, failedAliasResolution } = getSymbol(node, typeChecker); + let { symbol, failedAliasResolution } = getSymbol(node, typeChecker, stopAtAlias); let fallbackNode = node; if (searchOtherFilesOnly && failedAliasResolution) { @@ -48,7 +48,7 @@ namespace ts.GoToDefinition { const importDeclaration = forEach([node, ...symbol?.declarations || emptyArray], n => findAncestor(n, isAnyImportOrBareOrAccessedRequire)); const moduleSpecifier = importDeclaration && tryGetModuleSpecifierFromDeclaration(importDeclaration); if (moduleSpecifier) { - ({ symbol, failedAliasResolution } = getSymbol(moduleSpecifier, typeChecker)); + ({ symbol, failedAliasResolution } = getSymbol(moduleSpecifier, typeChecker, stopAtAlias)); fallbackNode = moduleSpecifier; } } @@ -235,7 +235,7 @@ namespace ts.GoToDefinition { return definitionFromType(typeChecker.getTypeAtLocation(node.parent), typeChecker, node.parent, /*failedAliasResolution*/ false); } - const { symbol, failedAliasResolution } = getSymbol(node, typeChecker); + const { symbol, failedAliasResolution } = getSymbol(node, typeChecker, /*stopAtAlias*/ false); if (!symbol) return undefined; const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); @@ -292,14 +292,14 @@ namespace ts.GoToDefinition { return mapDefined(checker.getIndexInfosAtLocation(node), info => info.declaration && createDefinitionFromSignatureDeclaration(checker, info.declaration)); } - function getSymbol(node: Node, checker: TypeChecker) { + function getSymbol(node: Node, checker: TypeChecker, stopAtAlias: boolean | undefined) { const symbol = checker.getSymbolAtLocation(node); // If this is an alias, and the request came at the declaration location // get the aliased symbol instead. This allows for goto def on an import e.g. // import {A, B} from "mod"; // to jump to the implementation directly. let failedAliasResolution = false; - if (symbol?.declarations && symbol.flags & SymbolFlags.Alias && shouldSkipAlias(node, symbol.declarations[0])) { + if (symbol?.declarations && symbol.flags & SymbolFlags.Alias && !stopAtAlias && shouldSkipAlias(node, symbol.declarations[0])) { const aliased = checker.getAliasedSymbol(symbol); if (aliased.declarations) { return { symbol: aliased }; diff --git a/src/services/services.ts b/src/services/services.ts index 20373fa773e..ac731115beb 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1768,9 +1768,9 @@ namespace ts { } /// Goto definition - function getDefinitionAtPosition(fileName: string, position: number, searchOtherFilesOnly?: boolean): readonly DefinitionInfo[] | undefined { + function getDefinitionAtPosition(fileName: string, position: number, searchOtherFilesOnly?: boolean, stopAtAlias?: boolean): readonly DefinitionInfo[] | undefined { synchronizeHostData(); - return GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position, searchOtherFilesOnly); + return GoToDefinition.getDefinitionAtPosition(program, getValidSourceFile(fileName), position, searchOtherFilesOnly, stopAtAlias); } function getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined { diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index 61f90c9817d..604a8337426 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -377,12 +377,12 @@ namespace ts.Completions.StringCompletions { function isEmitResolutionKindUsingNodeModules(compilerOptions: CompilerOptions): boolean { return getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeJs || - getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node12 || + getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext; } function isEmitModuleResolutionRespectingExportMaps(compilerOptions: CompilerOptions) { - return getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node12 || + return getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext; } diff --git a/src/services/types.ts b/src/services/types.ts index f84ee7d3ca1..82ed0b94124 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -267,7 +267,7 @@ namespace ts { /* * Unlike `realpath and `readDirectory`, `readFile` and `fileExists` are now _required_ - * to properly acquire and setup source files under module: node12+ modes. + * to properly acquire and setup source files under module: node16+ modes. */ readFile(path: string, encoding?: string): string | undefined; fileExists(path: string): boolean; @@ -474,7 +474,10 @@ namespace ts { /*@internal*/ // eslint-disable-next-line @typescript-eslint/unified-signatures - getDefinitionAtPosition(fileName: string, position: number, searchOtherFilesOnly: boolean): readonly DefinitionInfo[] | undefined; + getDefinitionAtPosition(fileName: string, position: number, searchOtherFilesOnly: false, stopAtAlias: boolean): readonly DefinitionInfo[] | undefined; + /*@internal*/ + // eslint-disable-next-line @typescript-eslint/unified-signatures + getDefinitionAtPosition(fileName: string, position: number, searchOtherFilesOnly: boolean, stopAtAlias: false): readonly DefinitionInfo[] | undefined; getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; @@ -1176,7 +1179,20 @@ namespace ts { argumentCount: number; } + // Do not change existing values, as they exist in telemetry. + export const enum CompletionInfoFlags { + None = 0, + MayIncludeAutoImports = 1 << 0, + IsImportStatementCompletion = 1 << 1, + IsContinuation = 1 << 2, + ResolvedModuleSpecifiers = 1 << 3, + ResolvedModuleSpecifiersBeyondLimit = 1 << 4, + MayIncludeMethodSnippets = 1 << 5, + } + export interface CompletionInfo { + /** For performance telemetry. */ + flags?: CompletionInfoFlags; /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 16d406f7d25..18f85ceb264 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -1928,6 +1928,14 @@ namespace ts { }; } + export function moduleResolutionRespectsExports(moduleResolution: ModuleResolutionKind): boolean { + return moduleResolution >= ModuleResolutionKind.Node16 && moduleResolution <= ModuleResolutionKind.NodeNext; + } + + export function moduleResolutionUsesNodeModules(moduleResolution: ModuleResolutionKind): boolean { + return moduleResolution === ModuleResolutionKind.NodeJs || moduleResolution >= ModuleResolutionKind.Node16 && moduleResolution <= ModuleResolutionKind.NodeNext; + } + export function makeImportIfNecessary(defaultImport: Identifier | undefined, namedImports: readonly ImportSpecifier[] | undefined, moduleSpecifier: string, quotePreference: QuotePreference): ImportDeclaration | undefined { return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : undefined; } diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 9b9ec6cdd10..3e25598e77c 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -155,6 +155,7 @@ "unittests/tsc/incremental.ts", "unittests/tsc/listFilesOnly.ts", "unittests/tsc/projectReferences.ts", + "unittests/tsc/redirect.ts", "unittests/tsc/runWithoutArgs.ts", "unittests/tscWatch/consoleClearing.ts", "unittests/tscWatch/emit.ts", diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 0c9a9fd954b..e2b48977106 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -159,7 +159,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'.", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -237,7 +237,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic', 'node12', 'nodenext'.", + messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/src/testRunner/unittests/moduleResolution.ts b/src/testRunner/unittests/moduleResolution.ts index 87c3587ec2f..872e9e8b17f 100644 --- a/src/testRunner/unittests/moduleResolution.ts +++ b/src/testRunner/unittests/moduleResolution.ts @@ -215,6 +215,7 @@ namespace ts { extension: Extension.Ts, }, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("/sub")); assert.isUndefined(cache.get("/")); @@ -228,6 +229,7 @@ namespace ts { extension: Extension.Ts, }, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("/sub/dir/foo")); assert.isDefined(cache.get("/sub/dir")); @@ -243,6 +245,7 @@ namespace ts { extension: Extension.Ts, }, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("/foo/bar")); assert.isDefined(cache.get("/foo")); @@ -257,6 +260,7 @@ namespace ts { extension: Extension.Ts, }, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("/foo")); assert.isUndefined(cache.get("/")); @@ -270,6 +274,7 @@ namespace ts { extension: Extension.Ts, }, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("c:/foo")); assert.isDefined(cache.get("c:/")); @@ -279,6 +284,7 @@ namespace ts { cache.set("/foo/bar/baz", { resolvedModule: undefined, failedLookupLocations: [], + resolutionDiagnostics: [], }); assert.isDefined(cache.get("/foo/bar/baz")); assert.isDefined(cache.get("/foo/bar")); diff --git a/src/testRunner/unittests/publicApi.ts b/src/testRunner/unittests/publicApi.ts index 2a5581bc93e..a1e43e7c371 100644 --- a/src/testRunner/unittests/publicApi.ts +++ b/src/testRunner/unittests/publicApi.ts @@ -130,6 +130,26 @@ describe("unittests:: Public APIs:: getTypeAtLocation", () => { const type = checker.getTypeAtLocation(file); assert.equal(type.flags, ts.TypeFlags.Any); }); + + it("returns an errorType for VariableDeclaration with BindingPattern name", () => { + const content = "const foo = [1];\n" + "const [a] = foo;"; + + const host = new fakes.CompilerHost(vfs.createFromFileSystem( + Harness.IO, + /*ignoreCase*/ true, + { documents: [new documents.TextDocument("/file.ts", content)], cwd: "/" })); + + const program = ts.createProgram({ + host, + rootNames: ["/file.ts"], + options: { noLib: true } + }); + + const checker = program.getTypeChecker(); + const file = program.getSourceFile("/file.ts")!; + const [declaration] = (ts.findLast(file.statements, ts.isVariableStatement) as ts.VariableStatement).declarationList.declarations; + assert.equal(checker.getTypeAtLocation(declaration).flags, ts.TypeFlags.Any); + }); }); describe("unittests:: Public APIs:: validateLocaleAndSetLanguage", () => { diff --git a/src/testRunner/unittests/tsbuild/helpers.ts b/src/testRunner/unittests/tsbuild/helpers.ts index 1214adf4800..468b8bf2a52 100644 --- a/src/testRunner/unittests/tsbuild/helpers.ts +++ b/src/testRunner/unittests/tsbuild/helpers.ts @@ -78,26 +78,6 @@ namespace ts { }; } - export function getTime() { - let currentTime = 100; - return { tick, time, touch }; - - function tick() { - currentTime += 60_000; - } - - function time() { - return currentTime; - } - - function touch(fs: vfs.FileSystem, path: string) { - if (!fs.statSync(path).isFile()) { - throw new Error(`File ${path} does not exist`); - } - fs.utimesSync(path, new Date(time()), new Date(time())); - } - } - export const libContent = `${VirtualFS.libFile.content} interface ReadonlyArray {} declare const console: { log(msg: any): void; };`; @@ -154,26 +134,6 @@ interface Symbol { fs.makeReadonly(); } - /** - * Gets the FS mountuing existing fs's /src and /lib folder - */ - export function getFsWithTime(baseFs: vfs.FileSystem) { - const { time, tick } = getTime(); - const host = new fakes.System(baseFs) as any as vfs.FileSystemResolverHost; - host.getWorkspaceRoot = notImplemented; - const resolver = vfs.createResolver(host); - const fs = new vfs.FileSystem(/*ignoreCase*/ true, { - files: { - ["/src"]: new vfs.Mount("/src", resolver), - ["/lib"]: new vfs.Mount("/lib", resolver) - }, - cwd: "/", - meta: { defaultLibLocation: "/lib" }, - time - }); - return { fs, time, tick }; - } - export function verifyOutputsPresent(fs: vfs.FileSystem, outputs: readonly string[]) { for (const output of outputs) { assert(fs.existsSync(output), `Expect file ${output} to exist`); @@ -249,7 +209,7 @@ interface Symbol { affectedFilesPendingEmit?: readonly ReadableProgramBuilderInfoFilePendingEmit[]; } type ReadableBuildInfo = Omit & { program: ReadableProgramBuildInfo | undefined; size: number; }; - function generateBuildInfoProgramBaseline(sys: System, originalWriteFile: System["writeFile"], buildInfoPath: string, buildInfo: BuildInfo) { + function generateBuildInfoProgramBaseline(sys: System, buildInfoPath: string, buildInfo: BuildInfo) { const fileInfos: ReadableProgramBuildInfo["fileInfos"] = {}; buildInfo.program?.fileInfos.forEach((fileInfo, index) => fileInfos[toFileName(index + 1 as ProgramBuildInfoFileId)] = toBuilderStateFileInfo(fileInfo)); const fileNamesList = buildInfo.program?.fileIdsList?.map(fileIdsListId => fileIdsListId.map(toFileName)); @@ -280,7 +240,7 @@ interface Symbol { size: getBuildInfoText({ ...buildInfo, version }).length, }; // For now its just JSON.stringify - originalWriteFile.call(sys, `${buildInfoPath}.readable.baseline.txt`, JSON.stringify(result, /*replacer*/ undefined, 2)); + sys.writeFile(`${buildInfoPath}.readable.baseline.txt`, JSON.stringify(result, /*replacer*/ undefined, 2)); function toFileName(fileId: ProgramBuildInfoFileId) { return buildInfo.program!.fileNames[fileId - 1]; @@ -306,16 +266,15 @@ interface Symbol { export function baselineBuildInfo( options: CompilerOptions, - sys: System & { writtenFiles: ReadonlyCollection; }, + sys: TscCompileSystem | tscWatch.WatchedSystem, originalReadCall?: System["readFile"], - originalWriteFile?: System["writeFile"], ) { const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - if (!buildInfoPath || !sys.writtenFiles.has(toPathWithSystem(sys, buildInfoPath))) return; + if (!buildInfoPath || !sys.writtenFiles!.has(toPathWithSystem(sys, buildInfoPath))) return; if (!sys.fileExists(buildInfoPath)) return; const buildInfo = getBuildInfo((originalReadCall || sys.readFile).call(sys, buildInfoPath, "utf8")!); - generateBuildInfoProgramBaseline(sys, originalWriteFile || sys.writeFile, buildInfoPath, buildInfo); + generateBuildInfoProgramBaseline(sys, buildInfoPath, buildInfo); if (!outFile(options)) return; const { jsFilePath, declarationFilePath } = getOutputPathsForBundle(options, /*forceDts*/ false); @@ -328,136 +287,173 @@ interface Symbol { generateBundleFileSectionInfo(sys, originalReadCall || sys.readFile, baselineRecorder, bundle.dts, declarationFilePath); baselineRecorder.Close(); const text = baselineRecorder.lines.join("\r\n"); - (originalWriteFile || sys.writeFile).call(sys, `${buildInfoPath}.baseline.txt`, text); + sys.writeFile(`${buildInfoPath}.baseline.txt`, text); } - - interface VerifyTscEditCorrectnessInput { + interface VerifyTscEditDiscrepanciesInput { + index: number; scenario: TestTscCompile["scenario"]; + subScenario: TestTscCompile["subScenario"]; + baselines: string[] | undefined; commandLineArgs: TestTscCompile["commandLineArgs"]; modifyFs: TestTscCompile["modifyFs"]; editFs: TestTscEdit["modifyFs"]; - tick: () => void; baseFs: vfs.FileSystem; newSys: TscCompileSystem; - cleanBuildDiscrepancies: TestTscEdit["cleanBuildDiscrepancies"]; + discrepancyExplanation: TestTscEdit["discrepancyExplanation"]; } - /** Verify that emit is same as clean build vs building after edit */ - function verifyTscEditCorrectness(input: () => VerifyTscEditCorrectnessInput, index: number, subScenario: TestTscCompile["subScenario"]) { - it(`Verify emit output file text is same when built clean for incremental edit scenario at:: ${index} ${subScenario}`, () => { - const { - scenario, commandLineArgs, cleanBuildDiscrepancies, - modifyFs, editFs, - tick, baseFs, newSys - } = input(); - const sys = testTscCompile({ - scenario, - subScenario, - fs: () => baseFs.makeReadonly(), - commandLineArgs, - modifyFs: fs => { - tick(); - if (modifyFs) modifyFs(fs); - editFs(fs); - }, - disableUseFileVersionAsSignature: true, - }); - const discrepancies = cleanBuildDiscrepancies?.(); - for (const outputFile of arrayFrom(sys.writtenFiles.keys())) { - const cleanBuildText = sys.readFile(outputFile); - const incrementalBuildText = newSys.readFile(outputFile); - const descrepancyInClean = discrepancies?.get(outputFile); - if (isBuildInfoFile(outputFile)) { - // Check only presence and absence and not text as we will do that for readable baseline - assert.isTrue(sys.fileExists(`${outputFile}.readable.baseline.txt`), `Readable baseline should be present in clean build:: File:: ${outputFile}`); - assert.isTrue(newSys.fileExists(`${outputFile}.readable.baseline.txt`), `Readable baseline should be present in incremental build:: File:: ${outputFile}`); - if (descrepancyInClean === undefined) { - verifyPresenceAbsence(incrementalBuildText, cleanBuildText, `Incremental and clean tsbuildinfo file presence should match:: File:: ${outputFile}`); - } - else { - verifyTextEqual(incrementalBuildText, cleanBuildText, descrepancyInClean, `File: ${outputFile}`); - } - } - else if (!fileExtensionIs(outputFile, ".tsbuildinfo.readable.baseline.txt")) { - verifyTextEqual(incrementalBuildText, cleanBuildText, descrepancyInClean, `File: ${outputFile}`); - } - else if (incrementalBuildText !== cleanBuildText) { - // Verify build info without affectedFilesPendingEmit - const { buildInfo: incrementalBuildInfo, readableBuildInfo: incrementalReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(incrementalBuildText); - const { buildInfo: cleanBuildInfo, readableBuildInfo: cleanReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(cleanBuildText); - verifyTextEqual(incrementalBuildInfo, cleanBuildInfo, descrepancyInClean, `TsBuild info text without affectedFilesPendingEmit ${subScenario}:: ${outputFile}::\nIncremental buildInfoText:: ${incrementalBuildText}\nClean buildInfoText:: ${cleanBuildText}`); - if (descrepancyInClean === undefined) { - // Verify file info sigantures - verifyMapLike( - incrementalReadableBuildInfo?.program?.fileInfos, - cleanReadableBuildInfo?.program?.fileInfos, - (key, incrementalFileInfo, cleanFileInfo) => { - if (incrementalFileInfo.signature !== cleanFileInfo.signature && incrementalFileInfo.signature !== incrementalFileInfo.version) { - assert.fail(`Incremental signature should either be dts signature or file version for File:: ${key}:: Incremental:: ${JSON.stringify(incrementalFileInfo)}, Clean:: ${JSON.stringify(cleanFileInfo)}}`); - } - }, - `FileInfos:: File:: ${outputFile}` - ); - // Verify exportedModulesMap - verifyMapLike( - incrementalReadableBuildInfo?.program?.exportedModulesMap, - cleanReadableBuildInfo?.program?.exportedModulesMap, - (key, incrementalReferenceSet, cleanReferenceSet) => { - if (!arrayIsEqualTo(incrementalReferenceSet, cleanReferenceSet) && !arrayIsEqualTo(incrementalReferenceSet, incrementalReadableBuildInfo!.program!.referencedMap![key])) { - assert.fail(`Incremental Reference set should either be from dts or files reference map for File:: ${key}:: Incremental:: ${JSON.stringify(incrementalReferenceSet)}, Clean:: ${JSON.stringify(cleanReferenceSet)}, referenceMap:: ${JSON.stringify(incrementalReadableBuildInfo!.program!.referencedMap![key])}}`); - } - }, - `exportedModulesMap:: File:: ${outputFile}` - ); - // Verify that incrementally pending affected file emit are in clean build since clean build can contain more files compared to incremental depending of noEmitOnError option - if (incrementalReadableBuildInfo?.program?.affectedFilesPendingEmit) { - assert.isDefined(cleanReadableBuildInfo?.program?.affectedFilesPendingEmit, `Incremental build contains affectedFilesPendingEmit, clean build should also have it: ${outputFile}::\nIncremental buildInfoText:: ${incrementalBuildText}\nClean buildInfoText:: ${cleanBuildText}`); - let expectedIndex = 0; - incrementalReadableBuildInfo.program.affectedFilesPendingEmit.forEach(([actualFile]) => { - expectedIndex = findIndex(cleanReadableBuildInfo!.program!.affectedFilesPendingEmit!, ([expectedFile]) => actualFile === expectedFile, expectedIndex); - assert.notEqual(expectedIndex, -1, `Incremental build contains ${actualFile} file as pending emit, clean build should also have it: ${outputFile}::\nIncremental buildInfoText:: ${incrementalBuildText}\nClean buildInfoText:: ${cleanBuildText}`); - expectedIndex++; - }); - } - } - } - } - - function verifyTextEqual(incrementalText: string | undefined, cleanText: string | undefined, descrepancyInClean: CleanBuildDescrepancy | undefined, message: string) { - if (descrepancyInClean === undefined) { - assert.equal(incrementalText, cleanText, message); - return; - } - switch (descrepancyInClean) { - case CleanBuildDescrepancy.CleanFileTextDifferent: - assert.isDefined(incrementalText, `Incremental file should be present:: ${message}`); - assert.isDefined(cleanText, `Clean file should be present present:: ${message}`); - assert.notEqual(incrementalText, cleanText, message); - return; - case CleanBuildDescrepancy.CleanFilePresent: - assert.isUndefined(incrementalText, `Incremental file should be absent:: ${message}`); - assert.isDefined(cleanText, `Clean file should be present:: ${message}`); - return; - default: - Debug.assertNever(descrepancyInClean); - } - } - - function verifyMapLike(incremental: MapLike | undefined, clean: MapLike | undefined, verifyValue: (key: string, incrementalValue: T, cleanValue: T) => void, message: string) { - verifyPresenceAbsence(incremental, clean, `Incremental and clean presence should match:: ${message}`); - if (!incremental) return; - const incrementalMap = new Map(getEntries(incremental)); - const cleanMap = new Map(getEntries(clean!)); - assert.equal(incrementalMap.size, cleanMap.size, `Incremental and clean size of map should match:: ${message}, Incremental keys: ${arrayFrom(incrementalMap.keys())} Clean: ${arrayFrom(cleanMap.keys())}${VirtualFS.getDiffInKeys(incrementalMap, arrayFrom(cleanMap.keys()))}`); - cleanMap.forEach((cleanValue, key) => { - assert.isTrue(incrementalMap.has(key), `Expected to contain ${key} in incremental map:: ${message}, Incremental keys: ${arrayFrom(incrementalMap.keys())}`); - verifyValue(key, incrementalMap.get(key)!, cleanValue); - }); - } + function verifyTscEditDiscrepancies({ + index, scenario, subScenario, commandLineArgs, + discrepancyExplanation, baselines, + modifyFs, editFs, baseFs, newSys + }: VerifyTscEditDiscrepanciesInput): string[] | undefined { + const sys = testTscCompile({ + scenario, + subScenario, + fs: () => baseFs.makeReadonly(), + commandLineArgs, + modifyFs: fs => { + if (modifyFs) modifyFs(fs); + editFs(fs); + }, + disableUseFileVersionAsSignature: true, }); - } + let headerAdded = false; + for (const outputFile of arrayFrom(sys.writtenFiles.keys())) { + const cleanBuildText = sys.readFile(outputFile); + const incrementalBuildText = newSys.readFile(outputFile); + if (isBuildInfoFile(outputFile)) { + // Check only presence and absence and not text as we will do that for readable baseline + if (!sys.fileExists(`${outputFile}.readable.baseline.txt`)) addBaseline(`Readable baseline not present in clean build:: File:: ${outputFile}`); + if (!newSys.fileExists(`${outputFile}.readable.baseline.txt`)) addBaseline(`Readable baseline not present in incremental build:: File:: ${outputFile}`); + verifyPresenceAbsence(incrementalBuildText, cleanBuildText, `Incremental and clean tsbuildinfo file presence differs:: File:: ${outputFile}`); + } + else if (!fileExtensionIs(outputFile, ".tsbuildinfo.readable.baseline.txt")) { + verifyTextEqual(incrementalBuildText, cleanBuildText, `File: ${outputFile}`); + } + else if (incrementalBuildText !== cleanBuildText) { + // Verify build info without affectedFilesPendingEmit + const { buildInfo: incrementalBuildInfo, readableBuildInfo: incrementalReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(incrementalBuildText); + const { buildInfo: cleanBuildInfo, readableBuildInfo: cleanReadableBuildInfo } = getBuildInfoForIncrementalCorrectnessCheck(cleanBuildText); + verifyTextEqual(incrementalBuildInfo, cleanBuildInfo, `TsBuild info text without affectedFilesPendingEmit:: ${outputFile}::`); + // Verify file info sigantures + verifyMapLike( + incrementalReadableBuildInfo?.program?.fileInfos, + cleanReadableBuildInfo?.program?.fileInfos, + (key, incrementalFileInfo, cleanFileInfo) => { + if (incrementalFileInfo.signature !== cleanFileInfo.signature && incrementalFileInfo.signature !== incrementalFileInfo.version) { + return [ + `Incremental signature is neither dts signature nor file version for File:: ${key}`, + `Incremental:: ${JSON.stringify(incrementalFileInfo, /*replacer*/ undefined, 2)}`, + `Clean:: ${JSON.stringify(cleanFileInfo, /*replacer*/ undefined, 2)}` + ]; + } + }, + `FileInfos:: File:: ${outputFile}` + ); + // Verify exportedModulesMap + verifyMapLike( + incrementalReadableBuildInfo?.program?.exportedModulesMap, + cleanReadableBuildInfo?.program?.exportedModulesMap, + (key, incrementalReferenceSet, cleanReferenceSet) => { + if (!arrayIsEqualTo(incrementalReferenceSet, cleanReferenceSet) && !arrayIsEqualTo(incrementalReferenceSet, incrementalReadableBuildInfo!.program!.referencedMap![key])) { + return [ + `Incremental Reference set is neither from dts nor files reference map for File:: ${key}::`, + `Incremental:: ${JSON.stringify(incrementalReferenceSet, /*replacer*/ undefined, 2)}`, + `Clean:: ${JSON.stringify(cleanReferenceSet, /*replacer*/ undefined, 2)}`, + `IncrementalReferenceMap:: ${JSON.stringify(incrementalReadableBuildInfo!.program!.referencedMap![key], /*replacer*/ undefined, 2)}`, + `CleanReferenceMap:: ${JSON.stringify(cleanReadableBuildInfo!.program!.referencedMap![key], /*replacer*/ undefined, 2)}`, + ]; + } + }, + `exportedModulesMap:: File:: ${outputFile}` + ); + // Verify that incrementally pending affected file emit are in clean build since clean build can contain more files compared to incremental depending of noEmitOnError option + if (incrementalReadableBuildInfo?.program?.affectedFilesPendingEmit) { + if (cleanReadableBuildInfo?.program?.affectedFilesPendingEmit === undefined) { + addBaseline( + `Incremental build contains affectedFilesPendingEmit, clean build does not have it: ${outputFile}::`, + `Incremental buildInfoText:: ${incrementalBuildText}`, + `Clean buildInfoText:: ${cleanBuildText}` + ); + } + let expectedIndex = 0; + incrementalReadableBuildInfo.program.affectedFilesPendingEmit.forEach(([actualFile]) => { + expectedIndex = findIndex(cleanReadableBuildInfo!.program!.affectedFilesPendingEmit!, ([expectedFile]) => actualFile === expectedFile, expectedIndex); + if (expectedIndex === -1) { + addBaseline( + `Incremental build contains ${actualFile} file as pending emit, clean build does not have it: ${outputFile}::`, + `Incremental buildInfoText:: ${incrementalBuildText}`, + `Clean buildInfoText:: ${cleanBuildText}` + ); + } + expectedIndex++; + }); + } + } + } + if (!headerAdded && discrepancyExplanation) addBaseline("*** Supplied discrepancy explanation but didnt file any difference"); + return baselines; - function verifyPresenceAbsence(actual: T | undefined, expected: T | undefined, message: string) { - (expected !== undefined ? assert.isDefined : assert.isUndefined)(actual, message); + function verifyTextEqual(incrementalText: string | undefined, cleanText: string | undefined, message: string) { + if (incrementalText !== cleanText) writeNotEqual(incrementalText, cleanText, message); + } + + function verifyMapLike(incremental: MapLike | undefined, clean: MapLike | undefined, verifyValue: (key: string, incrementalValue: T, cleanValue: T) => string[] | undefined, message: string) { + verifyPresenceAbsence(incremental, clean, `Incremental and clean do not match:: ${message}`); + if (!incremental || !clean) return; + const incrementalMap = new Map(getEntries(incremental)); + const cleanMap = new Map(getEntries(clean)); + if (incrementalMap.size !== cleanMap.size) { + addBaseline( + `Incremental and clean size of maps do not match:: ${message}`, + `Incremental: ${JSON.stringify(incremental, /*replacer*/ undefined, 2)}`, + `Clean: ${JSON.stringify(clean, /*replacer*/ undefined, 2)}`, + ); + return; + } + cleanMap.forEach((cleanValue, key) => { + const incrementalValue = incrementalMap.get(key); + if (!incrementalValue) { + addBaseline( + `Incremental does not contain ${key} which is present in clean:: ${message}`, + `Incremental: ${JSON.stringify(incremental, /*replacer*/ undefined, 2)}`, + `Clean: ${JSON.stringify(clean, /*replacer*/ undefined, 2)}`, + ); + } + else { + const result = verifyValue(key, incrementalMap.get(key)!, cleanValue); + if (result) addBaseline(...result); + } + }); + } + + function verifyPresenceAbsence(actual: T | undefined, expected: T | undefined, message: string) { + if (expected === undefined) { + if (actual === undefined) return; + } + else { + if (actual !== undefined) return; + } + writeNotEqual(actual, expected, message); + } + + function writeNotEqual(actual: T | undefined, expected: T | undefined, message: string) { + addBaseline( + message, + "CleanBuild:", + isString(expected) ? expected : JSON.stringify(expected), + "IncrementalBuild:", + isString(actual) ? actual : JSON.stringify(actual), + ); + } + + function addBaseline(...text: string[]) { + if (!baselines || !headerAdded) { + (baselines ||= []).push(`${index}:: ${subScenario}`, ...(discrepancyExplanation?.()|| ["*** Needs explanation"])); + headerAdded = true; + } + baselines.push(...text); + } } function getBuildInfoForIncrementalCorrectnessCheck(text: string | undefined): { @@ -467,7 +463,7 @@ interface Symbol { if (!text) return { buildInfo: text }; const readableBuildInfo = JSON.parse(text) as ReadableBuildInfo; let sanitizedFileInfos: MapLike | undefined; - if (readableBuildInfo.program) { + if (readableBuildInfo.program?.fileInfos) { sanitizedFileInfos = {}; for (const id in readableBuildInfo.program.fileInfos) { if (hasProperty(readableBuildInfo.program.fileInfos, id)) { @@ -503,51 +499,35 @@ interface Symbol { modifyFs: (fs: vfs.FileSystem) => void; subScenario: string; commandLineArgs?: readonly string[]; - cleanBuildDiscrepancies?: () => ESMap; + /** An array of lines to be printed in order when a discrepancy is detected */ + discrepancyExplanation?: () => readonly string[]; } - export interface VerifyTscWithEditsInput extends VerifyTscWithEditsWorkerInput { - baselineIncremental?: boolean; - } - export interface VerifyTscWithEditsWorkerInput extends TestTscCompile { + export interface VerifyTscWithEditsInput extends TestTscCompile { edits: TestTscEdit[]; } /** * Verify non watch tsc invokcation after each edit */ - export function verifyTscWithEdits(input: VerifyTscWithEditsInput) { - verifyTscWithEditsWorker(input); - if (input.baselineIncremental) { - verifyTscWithEditsWorker({ - ...input, - subScenario: `${input.subScenario} with incremental`, - commandLineArgs: [...input.commandLineArgs, "--incremental"], - }); - } - } - function verifyTscWithEditsWorker({ + export function verifyTscWithEdits({ subScenario, fs, scenario, commandLineArgs, baselineSourceMap, modifyFs, baselineReadFileCalls, baselinePrograms, edits - }: VerifyTscWithEditsWorkerInput) { + }: VerifyTscWithEditsInput) { describe(`tsc ${commandLineArgs.join(" ")} ${scenario}:: ${subScenario} serializedEdits`, () => { - let tick: () => void; let sys: TscCompileSystem; let baseFs: vfs.FileSystem; let editsSys: TscCompileSystem[]; before(() => { Debug.assert(!!edits.length, `${scenario}/${subScenario}:: No incremental scenarios, you probably want to use verifyTsc instead.`); - ({ fs: baseFs, tick } = getFsWithTime(fs())); + baseFs = fs().makeReadonly(); sys = testTscCompile({ scenario, subScenario, - fs: () => baseFs.makeReadonly(), + fs: () => baseFs, commandLineArgs, - modifyFs: fs => { - if (modifyFs) modifyFs(fs); - tick(); - }, + modifyFs, baselineSourceMap, baselineReadFileCalls, baselinePrograms @@ -556,18 +536,13 @@ interface Symbol { { modifyFs, subScenario: editScenario, commandLineArgs: editCommandLineArgs }, index ) => { - tick(); (editsSys || (editsSys = [])).push(testTscCompile({ scenario, subScenario: editScenario || subScenario, diffWithInitial: true, fs: () => index === 0 ? sys.vfs : editsSys[index - 1].vfs, commandLineArgs: editCommandLineArgs || commandLineArgs, - modifyFs: fs => { - tick(); - modifyFs(fs); - tick(); - }, + modifyFs, baselineSourceMap, baselineReadFileCalls, baselinePrograms @@ -577,39 +552,45 @@ interface Symbol { after(() => { baseFs = undefined!; sys = undefined!; - tick = undefined!; editsSys = undefined!; }); - describe("tsc invocation after edit", () => { - verifyTscBaseline(() => ({ - baseLine: () => { - const { file, text } = sys.baseLine(); - const texts: string[] = [text]; - editsSys.forEach((sys, index) => { - const incrementalScenario = edits[index]; - texts.push(""); - texts.push(`Change:: ${incrementalScenario.subScenario}`); - texts.push(sys.baseLine().text); - }); - return { file, text: texts.join("\r\n") }; - } - })); - }); - describe("tsc invocation after edit and clean build correctness", () => { - edits.forEach(({ commandLineArgs: editCommandLineArgs, subScenario, cleanBuildDiscrepancies }, index) => verifyTscEditCorrectness(() => ({ - scenario, - baseFs, - newSys: editsSys[index], - commandLineArgs: editCommandLineArgs || commandLineArgs, - cleanBuildDiscrepancies, - editFs: fs => { - for (let i = 0; i <= index; i++) { - edits[i].modifyFs(fs); - } - }, - modifyFs, - tick - }), index, subScenario)); + verifyTscBaseline(() => ({ + baseLine: () => { + const { file, text } = sys.baseLine(); + const texts: string[] = [text]; + editsSys.forEach((sys, index) => { + const incrementalScenario = edits[index]; + texts.push(""); + texts.push(`Change:: ${incrementalScenario.subScenario}`); + texts.push(sys.baseLine().text); + }); + return { file, text: texts.join("\r\n") }; + } + })); + it("tsc invocation after edit and clean build correctness", () => { + let baselines: string[] | undefined; + for (let index = 0; index < edits.length; index++) { + baselines = verifyTscEditDiscrepancies({ + index, + scenario, + subScenario: edits[index].subScenario, + baselines, + baseFs, + newSys: editsSys[index], + commandLineArgs: edits[index].commandLineArgs || commandLineArgs, + discrepancyExplanation: edits[index].discrepancyExplanation, + editFs: fs => { + for (let i = 0; i <= index; i++) { + edits[i].modifyFs(fs); + } + }, + modifyFs + }); + } + Harness.Baseline.runBaseline( + `${isBuild(commandLineArgs) ? "tsbuild" : "tsc"}/${scenario}/${subScenario.split(" ").join("-")}-discrepancies.js`, + baselines ? baselines.join("\r\n") : null // eslint-disable-line no-null/no-null + ); }); }); } diff --git a/src/testRunner/unittests/tsbuild/moduleResolution.ts b/src/testRunner/unittests/tsbuild/moduleResolution.ts index 0ac72229362..10508b92404 100644 --- a/src/testRunner/unittests/tsbuild/moduleResolution.ts +++ b/src/testRunner/unittests/tsbuild/moduleResolution.ts @@ -90,7 +90,7 @@ namespace ts.tscWatch { content: JSON.stringify({ compilerOptions: { outDir: "build", - module: "node12", + module: "node16", }, references: [{ path: "../pkg2" }] }) @@ -109,7 +109,7 @@ namespace ts.tscWatch { compilerOptions: { composite: true, outDir: "build", - module: "node12", + module: "node16", } }) }, @@ -126,7 +126,7 @@ namespace ts.tscWatch { path: `${projectRoot}/node_modules/pkg2`, symLink: `${projectRoot}/packages/pkg2`, }, - { ...libFile, path: `/a/lib/lib.es2020.full.d.ts` } + { ...libFile, path: `/a/lib/lib.es2022.full.d.ts` } ], { currentDirectory: projectRoot }), commandLineArgs: ["-b", "packages/pkg1", "-w", "--verbose", "--traceResolution"], changes: [ diff --git a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts index 9c560a1bd6f..d8caa8997e7 100644 --- a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts +++ b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts @@ -89,7 +89,7 @@ namespace ts { }); }); - // https://github.com/microsoft/TypeScript/issues/44434 but with `module: node12`, some `exports` maps blocking direct access, and no `baseUrl` + // https://github.com/microsoft/TypeScript/issues/44434 but with `module: node16`, some `exports` maps blocking direct access, and no `baseUrl` describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers across referenced projects resolve correctly", () => { verifyTsc({ scenario: "moduleSpecifiers", @@ -140,7 +140,7 @@ namespace ts { { "compilerOptions": { "declaration": true, - "module": "node12" + "module": "node16" } }`, "/src/src-types/package.json": Utils.dedent` @@ -178,7 +178,7 @@ namespace ts { }`, }, ""), modifyFs: fs => { - fs.writeFileSync("/lib/lib.es2020.full.d.ts", tscWatch.libFile.content); + fs.writeFileSync("/lib/lib.es2022.full.d.ts", tscWatch.libFile.content); fs.symlinkSync("/src", "/src/src-types/node_modules"); fs.symlinkSync("/src", "/src/src-dogs/node_modules"); }, diff --git a/src/testRunner/unittests/tsbuild/noEmitOnError.ts b/src/testRunner/unittests/tsbuild/noEmitOnError.ts index 93586fa5410..f1aa1ac17c0 100644 --- a/src/testRunner/unittests/tsbuild/noEmitOnError.ts +++ b/src/testRunner/unittests/tsbuild/noEmitOnError.ts @@ -8,40 +8,81 @@ namespace ts { projFs = undefined!; }); - function verifyNoEmitOnError(subScenario: string, fixModifyFs: TestTscEdit["modifyFs"], modifyFs?: TestTscEdit["modifyFs"]) { - verifyTscWithEdits({ - scenario: "noEmitOnError", - subScenario, - fs: () => projFs, - modifyFs, - commandLineArgs: ["--b", "/src/tsconfig.json"], - edits: [ - noChangeRun, - { - subScenario: "Fix error", - modifyFs: fixModifyFs, - }, - noChangeRun, - ], - baselinePrograms: true, - baselineIncremental: true - }); - } - - verifyNoEmitOnError( - "syntax errors", - fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; + verifyTscWithEdits({ + scenario: "noEmitOnError", + subScenario: "syntax errors", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json"], + edits: [ + noChangeRun, + { + subScenario: "Fix error", + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; const a = { lastName: 'sdsd' -};`, "utf-8") - ); +};`, "utf-8"), + }, + noChangeRun, + ], + baselinePrograms: true, + }); - verifyNoEmitOnError( - "semantic errors", - fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; + verifyTscWithEdits({ + scenario: "noEmitOnError", + subScenario: "syntax errors with incremental", + fs: () => projFs, + commandLineArgs: ["--b", "/src/tsconfig.json", "--incremental"], + edits: [ + noChangeRun, + { + subScenario: "Fix error", + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`, "utf-8"), + discrepancyExplanation: noChangeWithExportsDiscrepancyRun.discrepancyExplanation, + }, + noChangeWithExportsDiscrepancyRun, + ], + baselinePrograms: true, + }); + + verifyTscWithEdits({ + scenario: "noEmitOnError", + subScenario: "semantic errors", + fs: () => projFs, + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`, "utf-8"), + commandLineArgs: ["--b", "/src/tsconfig.json"], + edits: [ + noChangeRun, + { + subScenario: "Fix error", + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; const a: string = "hello";`, "utf-8"), - fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; -const a: string = 10;`, "utf-8") - ); + }, + noChangeRun, + ], + baselinePrograms: true, + }); + + verifyTscWithEdits({ + scenario: "noEmitOnError", + subScenario: "semantic errors with incremental", + fs: () => projFs, + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`, "utf-8"), + commandLineArgs: ["--b", "/src/tsconfig.json", "--incremental"], + edits: [ + noChangeWithExportsDiscrepancyRun, + { + subScenario: "Fix error", + modifyFs: fs => fs.writeFileSync("/src/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`, "utf-8"), + }, + noChangeRun, + ], + baselinePrograms: true, + }); }); } diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index eb58823fd45..109ab200c69 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -10,10 +10,6 @@ namespace ts { outFileWithBuildFs = undefined!; }); - function createSolutionBuilder(host: fakes.SolutionBuilderHost, baseOptions?: BuildOptions) { - return ts.createSolutionBuilder(host, ["/src/third"], { dry: false, force: false, verbose: true, ...(baseOptions || {}) }); - } - interface VerifyOutFileScenarioInput { subScenario: string; modifyFs?: (fs: vfs.FileSystem) => void; @@ -108,8 +104,9 @@ namespace ts { function getOutFileFsAfterBuild() { if (outFileWithBuildFs) return outFileWithBuildFs; const fs = outFileFs.shadow(); - const host = fakes.SolutionBuilderHost.create(fs); - const builder = createSolutionBuilder(host); + const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc" }); + const host = createSolutionBuilderHostForBaseline(sys as TscCompileSystem); + const builder = createSolutionBuilder(host, ["/src/third"], { dry: false, force: false, verbose: true }); builder.build(); fs.makeReadonly(); return outFileWithBuildFs = fs; @@ -147,7 +144,7 @@ namespace ts { compile: sys => { // Buildinfo will have version which does not match with current ts version const buildHost = createSolutionBuilderHostForBaseline(sys, "FakeTSCurrentVersion"); - const builder = ts.createSolutionBuilder(buildHost, ["/src/third"], { verbose: true }); + const builder = createSolutionBuilder(buildHost, ["/src/third"], { verbose: true }); sys.exit(builder.build()); } }); @@ -181,7 +178,7 @@ namespace ts { commandLineArgs: ["--build", "/src/second/tsconfig.json"], compile: sys => { const buildHost = createSolutionBuilderHostForBaseline(sys); - const builder = ts.createSolutionBuilder(buildHost, ["/src/third/tsconfig.json"], {}); + const builder = createSolutionBuilder(buildHost, ["/src/third/tsconfig.json"], {}); sys.exit(builder.build("/src/second/tsconfig.json")); } }); @@ -193,7 +190,7 @@ namespace ts { commandLineArgs: ["--build", "--clean", "/src/second/tsconfig.json"], compile: sys => { const buildHost = createSolutionBuilderHostForBaseline(sys); - const builder = ts.createSolutionBuilder(buildHost, ["/src/third/tsconfig.json"], { verbose: true }); + const builder = createSolutionBuilder(buildHost, ["/src/third/tsconfig.json"], { verbose: true }); sys.exit(builder.clean("/src/second/tsconfig.json")); } }); diff --git a/src/testRunner/unittests/tsbuild/outputPaths.ts b/src/testRunner/unittests/tsbuild/outputPaths.ts index 6782a1bba96..72374f84611 100644 --- a/src/testRunner/unittests/tsbuild/outputPaths.ts +++ b/src/testRunner/unittests/tsbuild/outputPaths.ts @@ -55,16 +55,7 @@ namespace ts { } }) }), - edits: [ - noChangeRun, - { - ...noChangeProject, - cleanBuildDiscrepancies: () => new Map([ - ["/src/dist/tsconfig.tsbuildinfo", CleanBuildDescrepancy.CleanFileTextDifferent], // tsbuildinfo will have -p setting when built using -p vs no build happens incrementally because of no change. - ["/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt", CleanBuildDescrepancy.CleanFileTextDifferent] // tsbuildinfo will have -p setting when built using -p vs no build happens incrementally because of no change. - ]), - } - ], + edits, }, ["/src/dist/src/index.js", "/src/dist/src/index.d.ts"]); verify({ diff --git a/src/testRunner/unittests/tsbuild/publicApi.ts b/src/testRunner/unittests/tsbuild/publicApi.ts index b929e960221..cb2d35ca967 100644 --- a/src/testRunner/unittests/tsbuild/publicApi.ts +++ b/src/testRunner/unittests/tsbuild/publicApi.ts @@ -2,7 +2,7 @@ namespace ts { describe("unittests:: tsbuild:: Public API with custom transformers when passed to build", () => { let sys: TscCompileSystem; before(() => { - const initialFs = getFsWithTime(loadProjectFromFiles({ + const inputFs = loadProjectFromFiles({ "/src/tsconfig.json": JSON.stringify({ references: [ { path: "./shared/tsconfig.json" }, @@ -29,9 +29,7 @@ export class c2 { } export enum e2 { } // leading export function f22() { } // trailing`, - })).fs.makeReadonly(); - const inputFs = initialFs.shadow(); - inputFs.makeReadonly(); + }).makeReadonly(); const fs = inputFs.shadow(); // Create system @@ -48,7 +46,7 @@ export function f22() { } // trailing`, writtenFiles.add(path); return originalWriteFile.call(sys, fileName, content, writeByteOrderMark); }; - const { cb, getPrograms } = commandLineCallbacks(sys, /*originalReadCall*/ undefined, originalWriteFile); + const { cb, getPrograms } = commandLineCallbacks(sys, /*originalReadCall*/ undefined); const buildHost = createSolutionBuilderHost( sys, /*createProgram*/ undefined, diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index 122ff88b06a..5a7cf7e8259 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -21,7 +21,8 @@ namespace ts { function getSampleFsAfterBuild() { if (projFsWithBuild) return projFsWithBuild; const fs = projFs.shadow(); - const host = fakes.SolutionBuilderHost.create(fs); + const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc" }); + const host = createSolutionBuilderHostForBaseline(sys as TscCompileSystem); const builder = createSolutionBuilder(host, ["/src/tests"], {}); builder.build(); fs.makeReadonly(); @@ -245,7 +246,7 @@ namespace ts { ) ); - const host = createSolutionBuilderHost(system); + const host = createSolutionBuilderHostForBaseline(system); const builder = createSolutionBuilder(host, [testsConfig.path], {}); baseline.push("Input::"); baselineState(); @@ -316,7 +317,7 @@ namespace ts { ) ); - const host = createSolutionBuilderHost(system); + const host = createSolutionBuilderHostForBaseline(system); const builder = createSolutionBuilder(host, [testsConfig.path], { dry: false, force: false, verbose: false }); builder.build(); baselineState("Build of project"); diff --git a/src/testRunner/unittests/tsc/helpers.ts b/src/testRunner/unittests/tsc/helpers.ts index b4b6ff3de5f..81d22823e0b 100644 --- a/src/testRunner/unittests/tsc/helpers.ts +++ b/src/testRunner/unittests/tsc/helpers.ts @@ -3,13 +3,22 @@ namespace ts { writtenFiles: Set; baseLine(): { file: string; text: string; }; disableUseFileVersionAsSignature?: boolean; + storeFilesChangingSignatureDuringEmit?: boolean; }; export const noChangeRun: TestTscEdit = { subScenario: "no-change-run", modifyFs: noop }; + export const noChangeWithExportsDiscrepancyRun: TestTscEdit = { + ...noChangeRun, + discrepancyExplanation: () => [ + "Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files", + "Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed" + ] + }; export const noChangeOnlyRuns = [noChangeRun]; + export const noChangeWithExportsDiscrepancyOnlyRuns = [noChangeWithExportsDiscrepancyRun]; export interface TestTscCompile extends TestTscCompileLikeBase { baselineSourceMap?: boolean; @@ -28,23 +37,22 @@ namespace ts { return !!(program as Program | BuilderProgram).getCompilerOptions; } export function commandLineCallbacks( - sys: System & { writtenFiles: ReadonlyCollection; }, + sys: TscCompileSystem | tscWatch.WatchedSystem, originalReadCall?: System["readFile"], - originalWriteFile?: System["writeFile"], ): CommandLineCallbacks { let programs: CommandLineProgram[] | undefined; return { cb: program => { if (isAnyProgram(program)) { - baselineBuildInfo(program.getCompilerOptions(), sys, originalReadCall, originalWriteFile); + baselineBuildInfo(program.getCompilerOptions(), sys, originalReadCall); (programs || (programs = [])).push(isBuilderProgram(program) ? [program.getProgram(), program] : [program] ); } else { - baselineBuildInfo(program.options, sys, originalReadCall, originalWriteFile); + baselineBuildInfo(program.options, sys, originalReadCall); } }, getPrograms: () => { @@ -84,6 +92,7 @@ namespace ts { // Create system const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc", env: environmentVariables }) as TscCompileSystem; if (input.disableUseFileVersionAsSignature) sys.disableUseFileVersionAsSignature = true; + sys.storeFilesChangingSignatureDuringEmit = true; sys.write(`${sys.getExecutingFilePath()} ${commandLineArgs.join(" ")}\n`); sys.exit = exitCode => sys.exitCode = exitCode; worker(sys); @@ -120,16 +129,22 @@ ${patch ? vfs.formatPatch(patch) : ""}` const originalWriteFile = sys.writeFile; sys.writeFile = (fileName, content, writeByteOrderMark) => { const path = toPathWithSystem(sys, fileName); - assert.isFalse(writtenFiles.has(path)); + // When buildinfo is same for two projects, + // it gives error and doesnt write buildinfo but because buildInfo is written for one project, + // readable baseline will be written two times for those two projects with same contents and is ok + Debug.assert(!writtenFiles.has(path) || endsWith(path, "baseline.txt")); writtenFiles.add(path); return originalWriteFile.call(sys, fileName, content, writeByteOrderMark); }; - return originalWriteFile; } - export function createSolutionBuilderHostForBaseline(sys: TscCompileSystem, versionToWrite?: string) { - makeSystemReadyForBaseline(sys, versionToWrite); - const { cb } = commandLineCallbacks(sys); + export function createSolutionBuilderHostForBaseline( + sys: TscCompileSystem | tscWatch.WatchedSystem, + versionToWrite?: string, + originalRead?: (TscCompileSystem | tscWatch.WatchedSystem)["readFile"] + ) { + if (sys instanceof fakes.System) makeSystemReadyForBaseline(sys, versionToWrite); + const { cb } = commandLineCallbacks(sys, originalRead); const host = createSolutionBuilderHost(sys, /*createProgram*/ undefined, createDiagnosticReporter(sys, /*pretty*/ true), @@ -153,7 +168,7 @@ ${patch ? vfs.formatPatch(patch) : ""}` }); function commandLineCompile(sys: TscCompileSystem) { - const originalWriteFile = makeSystemReadyForBaseline(sys); + makeSystemReadyForBaseline(sys); actualReadFileMap = {}; const originalReadFile = sys.readFile; sys.readFile = path => { @@ -164,7 +179,7 @@ ${patch ? vfs.formatPatch(patch) : ""}` return originalReadFile.call(sys, path); }; - const result = commandLineCallbacks(sys, originalReadFile, originalWriteFile); + const result = commandLineCallbacks(sys, originalReadFile); executeCommandLine( sys, result.cb, @@ -212,7 +227,7 @@ ${patch ? vfs.formatPatch(patch) : ""}` describe(input.subScenario, () => { verifyTscBaseline(() => verifier({ ...input, - fs: () => getFsWithTime(input.fs()).fs.makeReadonly() + fs: () => input.fs().makeReadonly() })); }); }); diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts index ec5093e0849..b3bd30d91ae 100644 --- a/src/testRunner/unittests/tsc/incremental.ts +++ b/src/testRunner/unittests/tsc/incremental.ts @@ -90,7 +90,7 @@ namespace ts { commandLineArgs: ["--incremental", "-p", "src"], modifyFs, edits: [ - noChangeRun, + noChangeWithExportsDiscrepancyRun, { subScenario: "incremental-declaration-doesnt-change", modifyFs: fixModifyFs @@ -123,15 +123,20 @@ const a: string = 10;`, "utf-8"), verifyNoEmitChanges({ composite: true }); function verifyNoEmitChanges(compilerOptions: CompilerOptions) { + const discrepancyIfNoDtsEmit = getEmitDeclarations(compilerOptions) ? + undefined : + noChangeWithExportsDiscrepancyRun.discrepancyExplanation; const noChangeRunWithNoEmit: TestTscEdit = { ...noChangeRun, subScenario: "No Change run with noEmit", commandLineArgs: ["--p", "src/project", "--noEmit"], + discrepancyExplanation: discrepancyIfNoDtsEmit, }; const noChangeRunWithEmit: TestTscEdit = { ...noChangeRun, subScenario: "No Change run with emit", commandLineArgs: ["--p", "src/project"], + discrepancyExplanation: discrepancyIfNoDtsEmit, }; let optionsString = ""; for (const key in compilerOptions) { @@ -152,10 +157,12 @@ const a: string = 10;`, "utf-8"), subScenario: "Introduce error but still noEmit", commandLineArgs: ["--p", "src/project", "--noEmit"], modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop", "prop1"), + discrepancyExplanation: getEmitDeclarations(compilerOptions) ? noChangeWithExportsDiscrepancyRun.discrepancyExplanation : undefined, }, { subScenario: "Fix error and emit", modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"), + discrepancyExplanation: discrepancyIfNoDtsEmit }, noChangeRunWithEmit, noChangeRunWithNoEmit, @@ -164,6 +171,7 @@ const a: string = 10;`, "utf-8"), { subScenario: "Introduce error and emit", modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop", "prop1"), + discrepancyExplanation: discrepancyIfNoDtsEmit }, noChangeRunWithEmit, noChangeRunWithNoEmit, @@ -173,6 +181,7 @@ const a: string = 10;`, "utf-8"), subScenario: "Fix error and no emit", commandLineArgs: ["--p", "src/project", "--noEmit"], modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"), + discrepancyExplanation: noChangeWithExportsDiscrepancyRun.discrepancyExplanation, }, noChangeRunWithEmit, noChangeRunWithNoEmit, @@ -196,6 +205,7 @@ const a: string = 10;`, "utf-8"), { subScenario: "Fix error and no emit", modifyFs: fs => replaceText(fs, "/src/project/src/class.ts", "prop1", "prop"), + discrepancyExplanation: noChangeWithExportsDiscrepancyRun.discrepancyExplanation }, noChangeRunWithEmit, ], @@ -352,11 +362,10 @@ declare global { { subScenario: "Add class3 to project1 and build it", modifyFs: fs => fs.writeFileSync("/src/projects/project1/class3.ts", `class class3 {}`, "utf-8"), - cleanBuildDiscrepancies: () => new Map([ - // Ts buildinfo will not be updated in incremental build so it will have semantic diagnostics cached from previous build - // But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo - ["/src/projects/project2/tsconfig.tsbuildinfo", CleanBuildDescrepancy.CleanFileTextDifferent] - ]), + discrepancyExplanation: () => [ + "Ts buildinfo will not be updated in incremental build so it will have semantic diagnostics cached from previous build", + "But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo", + ], }, { subScenario: "Add output of class3", @@ -372,11 +381,10 @@ declare global { { subScenario: "Delete output for class3", modifyFs: fs => fs.unlinkSync("/src/projects/project1/class3.d.ts"), - cleanBuildDiscrepancies: () => new Map([ - // Ts buildinfo willbe updated but will retain lib file errors from previous build and not others because they are emitted because of change which results in clearing their semantic diagnostics cache - // But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo - ["/src/projects/project2/tsconfig.tsbuildinfo", CleanBuildDescrepancy.CleanFileTextDifferent] - ]), + discrepancyExplanation: () => [ + "Ts buildinfo will be updated but will retain lib file errors from previous build and not others because they are emitted because of change which results in clearing their semantic diagnostics cache", + "But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo", + ], }, { subScenario: "Create output for class3", @@ -464,5 +472,40 @@ declare global { fs.writeFileSync("/lib/lib.esnext.d.ts", libContent); } }); + + verifyTscWithEdits({ + scenario: "incremental", + subScenario: "change to type that gets used as global through export in another file", + commandLineArgs: ["-p", `src/project`], + fs: () => loadProjectFromFiles({ + "/src/project/tsconfig.json": JSON.stringify({ compilerOptions: { composite: true }, }), + "/src/project/class1.ts": `const a: MagicNumber = 1; +console.log(a);`, + "/src/project/constants.ts": "export default 1;", + "/src/project/types.d.ts": `type MagicNumber = typeof import('./constants').default`, + }), + edits: [{ + subScenario: "Modify imports used in global file", + modifyFs: fs => fs.writeFileSync("/src/project/constants.ts", "export default 2;"), + }], + }); + + verifyTscWithEdits({ + scenario: "incremental", + subScenario: "change to type that gets used as global through export in another file through indirect import", + commandLineArgs: ["-p", `src/project`], + fs: () => loadProjectFromFiles({ + "/src/project/tsconfig.json": JSON.stringify({ compilerOptions: { composite: true }, }), + "/src/project/class1.ts": `const a: MagicNumber = 1; +console.log(a);`, + "/src/project/constants.ts": "export default 1;", + "/src/project/reexport.ts": `export { default as ConstantNumber } from "./constants"`, + "/src/project/types.d.ts": `type MagicNumber = typeof import('./reexport').ConstantNumber`, + }), + edits: [{ + subScenario: "Modify imports used in global file", + modifyFs: fs => fs.writeFileSync("/src/project/constants.ts", "export default 2;"), + }], + }); }); } diff --git a/src/testRunner/unittests/tsc/redirect.ts b/src/testRunner/unittests/tsc/redirect.ts new file mode 100644 index 00000000000..e131ba821af --- /dev/null +++ b/src/testRunner/unittests/tsc/redirect.ts @@ -0,0 +1,34 @@ +namespace ts { + describe("unittests:: tsc:: redirect::", () => { + verifyTsc({ + scenario: "redirect", + subScenario: "when redirecting ts file", + fs: () => loadProjectFromFiles({ + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + outDir: "out" + }, + include: [ + "copy1/node_modules/target/*", + "copy2/node_modules/target/*", + ] + }), + "/src/project/copy1/node_modules/target/index.ts": "export const a = 1;", + "/src/project/copy1/node_modules/target/import.ts": `import {} from "./";`, + "/src/project/copy1/node_modules/target/package.json": JSON.stringify({ + name: "target", + version: "1.0.0", + main: "index.js", + }), + "/src/project/copy2/node_modules/target/index.ts": "export const a = 1;", + "/src/project/copy2/node_modules/target/import.ts": `import {} from "./";`, + "/src/project/copy2/node_modules/target/package.json": JSON.stringify({ + name: "target", + version: "1.0.0", + main: "index.js", + }), + }), + commandLineArgs: ["-p", "src/project"], + }); + }); +} diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index c4e1ce2ed16..60f1d351904 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -171,9 +171,10 @@ namespace ts.tscWatch { export interface Baseline extends BaselineBase, CommandLineCallbacks { } - export function createBaseline(system: WatchedSystem, modifySystem?: (sys: WatchedSystem) => void): Baseline { + export function createBaseline(system: WatchedSystem, modifySystem?: (sys: WatchedSystem, originalRead: WatchedSystem["readFile"]) => void): Baseline { + const originalRead = system.readFile; const initialSys = fakes.patchHostForBuildInfoReadWrite(system); - modifySystem?.(initialSys); + modifySystem?.(initialSys, originalRead); const sys = VirtualFS.changeToHostTrackingWrittenFiles(initialSys); const baseline: string[] = []; baseline.push("Input::"); @@ -336,7 +337,7 @@ namespace ts.tscWatch { if (!builderProgram) return; if (builderProgram !== oldProgram?.[1]) { const state = builderProgram.getState(); - const internalState = state as unknown as BuilderState; + const internalState = state as unknown as BuilderProgramState; if (state.semanticDiagnosticsPerFile?.size) { baseline.push("Semantic diagnostics in builder refreshed for::"); for (const file of program.getSourceFiles()) { @@ -354,9 +355,12 @@ namespace ts.tscWatch { baseline.push("Shape signatures in builder refreshed for::"); internalState.hasCalledUpdateShapeSignature.forEach((path: Path) => { const info = state.fileInfos.get(path); - if(info?.version === info?.signature || !info?.signature) { + if (info?.version === info?.signature || !info?.signature) { baseline.push(path + " (used version)"); } + else if (internalState.filesChangingSignature?.has(path)) { + baseline.push(path + " (computed .d.ts during emit)"); + } else { baseline.push(path + " (computed .d.ts)"); } @@ -407,30 +411,32 @@ namespace ts.tscWatch { sys.writeFile(file, content.replace(searchValue, replaceValue)); } - export function createSolutionBuilder(system: WatchedSystem, rootNames: readonly string[], defaultOptions?: BuildOptions) { - const host = createSolutionBuilderHost(system); - return ts.createSolutionBuilder(host, rootNames, defaultOptions || {}); + export function createSolutionBuilder(system: WatchedSystem, rootNames: readonly string[], originalRead?: WatchedSystem["readFile"]) { + const host = createSolutionBuilderHostForBaseline(system, /*versionToWrite*/ undefined, originalRead); + return ts.createSolutionBuilder(host, rootNames, {}); } export function ensureErrorFreeBuild(host: WatchedSystem, rootNames: readonly string[]) { // ts build should succeed - const solutionBuilder = createSolutionBuilder(host, rootNames, {}); - solutionBuilder.build(); + solutionBuildWithBaseline(host, rootNames); assert.equal(host.getOutput().length, 0, JSON.stringify(host.getOutput(), /*replacer*/ undefined, " ")); } - export function createSystemWithSolutionBuild(solutionRoots: readonly string[], files: readonly VirtualFS.FileOrFolderOrSymLink[], params?: VirtualFS.TestServerHostCreationParameters) { - const sys = createWatchedSystem(files, params); + export function solutionBuildWithBaseline(sys: WatchedSystem, solutionRoots: readonly string[], originalRead?: WatchedSystem["readFile"]) { const originalReadFile = sys.readFile; const originalWrite = sys.write; const originalWriteFile = sys.writeFile; const solutionBuilder = createSolutionBuilder(VirtualFS.changeToHostTrackingWrittenFiles( fakes.patchHostForBuildInfoReadWrite(sys) - ), solutionRoots, {}); + ), solutionRoots, originalRead); solutionBuilder.build(); sys.readFile = originalReadFile; sys.write = originalWrite; sys.writeFile = originalWriteFile; return sys; } + + export function createSystemWithSolutionBuild(solutionRoots: readonly string[], files: readonly VirtualFS.FileOrFolderOrSymLink[], params?: VirtualFS.TestServerHostCreationParameters) { + return solutionBuildWithBaseline(createWatchedSystem(files, params), solutionRoots); + } } diff --git a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts index d81ead88b01..5e7fff43851 100644 --- a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts +++ b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts @@ -10,10 +10,8 @@ namespace ts.tscWatch { function verifyWatch({ files, config, subScenario }: VerifyWatchInput, alreadyBuilt: boolean) { const { sys, baseline, oldSnap, cb, getPrograms } = createBaseline( createWatchedSystem(files), - alreadyBuilt ? sys => { - const solutionBuilder = createSolutionBuilder(sys, [config], {}); - solutionBuilder.build(); - solutionBuilder.close(); + alreadyBuilt ? (sys, originalRead) => { + solutionBuildWithBaseline(sys, [config], originalRead); sys.clearOutput(); } : undefined ); diff --git a/src/testRunner/unittests/tsserver/completions.ts b/src/testRunner/unittests/tsserver/completions.ts index ab84366efc9..3da4c8fe8ca 100644 --- a/src/testRunner/unittests/tsserver/completions.ts +++ b/src/testRunner/unittests/tsserver/completions.ts @@ -52,6 +52,7 @@ namespace ts.projectSystem { assert.isString(exportMapKey); delete (response?.entries[0].data as any).exportMapKey; assert.deepEqual(response, { + flags: CompletionInfoFlags.MayIncludeAutoImports, isGlobalCompletion: true, isIncomplete: undefined, isMemberCompletion: false, diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts index 2ca20ff4046..8ea9d5ff7f7 100644 --- a/src/testRunner/unittests/tsserver/metadataInResponse.ts +++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts @@ -77,6 +77,7 @@ namespace ts.projectSystem { command: protocol.CommandTypes.CompletionInfo, arguments: completionRequestArgs }, { + flags: 0, isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, diff --git a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts index 60e584882a0..e86cd6a694e 100644 --- a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts +++ b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts @@ -39,7 +39,7 @@ namespace ts.projectSystem { describe("unittests:: tsserver:: moduleSpecifierCache", () => { it("caches importability within a file", () => { const { moduleSpecifierCache } = setup(); - assert.isTrue(moduleSpecifierCache.get(bTs.path as Path, aTs.path as Path, {}, {})?.isAutoImportable); + assert.isFalse(moduleSpecifierCache.get(bTs.path as Path, aTs.path as Path, {}, {})?.isBlockedByPackageJsonDependencies); }); it("caches module specifiers within a file", () => { @@ -54,7 +54,7 @@ namespace ts.projectSystem { isRedirect: false }], moduleSpecifiers: ["mobx"], - isAutoImportable: true, + isBlockedByPackageJsonDependencies: false, }); }); @@ -72,7 +72,7 @@ namespace ts.projectSystem { const { host, moduleSpecifierCache } = setup(); host.writeFile("/src/a2.ts", aTs.content); host.runQueuedTimeoutCallbacks(); - assert.isTrue(moduleSpecifierCache.get(bTs.path as Path, aTs.path as Path, {}, {})?.isAutoImportable); + assert.isFalse(moduleSpecifierCache.get(bTs.path as Path, aTs.path as Path, {}, {})?.isBlockedByPackageJsonDependencies); }); it("invalidates the cache when symlinks are added or removed", () => { diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index a2da7c0141e..7608f1b3a0b 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1278,8 +1278,7 @@ bar;` const files = [solnConfig, sharedConfig, sharedIndex, sharedPackage, appConfig, appBar, appIndex, sharedSymlink, libFile]; const host = createServerHost(files); if (built) { - const solutionBuilder = tscWatch.createSolutionBuilder(host, [solnConfig.path], {}); - solutionBuilder.build(); + tscWatch.solutionBuildWithBaseline(host, [solnConfig.path]); host.clearOutput(); } const session = createSession(host, { logger: createLoggerWithInMemoryLogs() }); diff --git a/src/vfs/virtualFileSystemWithWatch.ts b/src/vfs/virtualFileSystemWithWatch.ts index c201bd18e87..23cc85d90d8 100644 --- a/src/vfs/virtualFileSystemWithWatch.ts +++ b/src/vfs/virtualFileSystemWithWatch.ts @@ -178,7 +178,7 @@ namespace ts.VirtualFS { DynamicPolling = "RecursiveDirectoryUsingDynamicPriorityPolling" } - const timeIncrements = 1000; + export const timeIncrements = 1000; /** * also implements {server.ServerHost} but that would create a circular dependency */ @@ -204,6 +204,7 @@ namespace ts.VirtualFS { private readonly currentDirectory: string; public require: ((initialPath: string, moduleName: string) => RequireResult) | undefined; public defaultWatchFileKind?: () => WatchFileKind | undefined; + public storeFilesChangingSignatureDuringEmit = true; watchFile: HostWatchFile; watchDirectory: HostWatchDirectory; constructor( diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt index b64781a4873..4d680b362ac 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts(4,19): error TS2569: Type 'Set' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts(4,19): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts(4,19 strSet.add('World') for (const str of strSet) { } ~~~~~~ -!!! error TS2569: Type 'Set' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. \ No newline at end of file +!!! error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt index 1fde67722db..e815c53e2f3 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts(2,17): error TS2569: Type 'Set' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. +tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts (1 errors) ==== var union: string | Set for (const e of union) { } ~~~~~ -!!! error TS2569: Type 'Set' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. \ No newline at end of file +!!! error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. \ No newline at end of file diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 4af00f86ee8..2236b8dccd9 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2063,7 +2063,7 @@ declare namespace ts { hasNoDefaultLib: boolean; languageVersion: ScriptTarget; /** - * When `module` is `Node12` or `NodeNext`, this field controls whether the + * When `module` is `Node16` or `NodeNext`, this field controls whether the * source file in question is an ESNext-output-format file, or a CommonJS-output-format * module. This is derived by the module resolver as it looks up the file, since * it is derived from either the file extension of the module, or the containing @@ -2172,7 +2172,9 @@ declare namespace ts { export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never; }; - export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void; + export interface WriteFileCallbackData { + } + export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; export class OperationCanceledException { } export interface CancellationToken { @@ -2891,7 +2893,7 @@ declare namespace ts { export enum ModuleResolutionKind { Classic = 1, NodeJs = 2, - Node12 = 3, + Node16 = 3, NodeNext = 99 } export enum ModuleDetectionKind { @@ -2900,7 +2902,7 @@ declare namespace ts { */ Legacy = 1, /** - * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+ + * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ */ Auto = 2, /** @@ -3072,7 +3074,7 @@ declare namespace ts { ES2020 = 6, ES2022 = 7, ESNext = 99, - Node12 = 100, + Node16 = 100, NodeNext = 199 } export enum JsxEmit { @@ -4816,7 +4818,7 @@ declare namespace ts { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`. + * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. */ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; /** @@ -6433,7 +6435,18 @@ declare namespace ts { argumentIndex: number; argumentCount: number; } + enum CompletionInfoFlags { + None = 0, + MayIncludeAutoImports = 1, + IsImportStatementCompletion = 2, + IsContinuation = 4, + ResolvedModuleSpecifiers = 8, + ResolvedModuleSpecifiersBeyondLimit = 16, + MayIncludeMethodSnippets = 32 + } interface CompletionInfo { + /** For performance telemetry. */ + flags?: CompletionInfoFlags; /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; @@ -6809,7 +6822,7 @@ declare namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. Only used if the file was not found * in the registry and a new one was created. @@ -6828,7 +6841,7 @@ declare namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. * @param version Current version of the file. @@ -8848,6 +8861,7 @@ declare namespace ts.server.protocol { body?: CompletionInfo; } interface CompletionInfo { + readonly flags?: number; readonly isGlobalCompletion: boolean; readonly isMemberCompletion: boolean; readonly isNewIdentifierLocation: boolean; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 22af7579a03..fb0a5a0c1e7 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2063,7 +2063,7 @@ declare namespace ts { hasNoDefaultLib: boolean; languageVersion: ScriptTarget; /** - * When `module` is `Node12` or `NodeNext`, this field controls whether the + * When `module` is `Node16` or `NodeNext`, this field controls whether the * source file in question is an ESNext-output-format file, or a CommonJS-output-format * module. This is derived by the module resolver as it looks up the file, since * it is derived from either the file extension of the module, or the containing @@ -2172,7 +2172,9 @@ declare namespace ts { export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never; }; - export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void; + export interface WriteFileCallbackData { + } + export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; export class OperationCanceledException { } export interface CancellationToken { @@ -2891,7 +2893,7 @@ declare namespace ts { export enum ModuleResolutionKind { Classic = 1, NodeJs = 2, - Node12 = 3, + Node16 = 3, NodeNext = 99 } export enum ModuleDetectionKind { @@ -2900,7 +2902,7 @@ declare namespace ts { */ Legacy = 1, /** - * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+ + * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ */ Auto = 2, /** @@ -3072,7 +3074,7 @@ declare namespace ts { ES2020 = 6, ES2022 = 7, ESNext = 99, - Node12 = 100, + Node16 = 100, NodeNext = 199 } export enum JsxEmit { @@ -4816,7 +4818,7 @@ declare namespace ts { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`. + * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. */ impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; /** @@ -6433,7 +6435,18 @@ declare namespace ts { argumentIndex: number; argumentCount: number; } + enum CompletionInfoFlags { + None = 0, + MayIncludeAutoImports = 1, + IsImportStatementCompletion = 2, + IsContinuation = 4, + ResolvedModuleSpecifiers = 8, + ResolvedModuleSpecifiersBeyondLimit = 16, + MayIncludeMethodSnippets = 32 + } interface CompletionInfo { + /** For performance telemetry. */ + flags?: CompletionInfoFlags; /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; @@ -6809,7 +6822,7 @@ declare namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. Only used if the file was not found * in the registry and a new one was created. @@ -6828,7 +6841,7 @@ declare namespace ts { * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node12`+, so providing a cache host + * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. * @param version Current version of the file. diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt index 0c8ac2b8ec9..f97a066c8c8 100644 --- a/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt +++ b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt @@ -12,8 +12,8 @@ tests/cases/compiler/awaitInNonAsyncFunction.ts(30,9): error TS1103: 'for await' tests/cases/compiler/awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. tests/cases/compiler/awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. tests/cases/compiler/awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/compiler/awaitInNonAsyncFunction.ts (16 errors) ==== @@ -97,7 +97,7 @@ tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level ' for await (const _ of []); ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. await null; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. \ No newline at end of file +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. \ No newline at end of file diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index f03ee666dc0..b46b77f0f76 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -6,6 +6,7 @@ "name": "" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, diff --git a/tests/baselines/reference/completionImportCallAssertion.baseline b/tests/baselines/reference/completionImportCallAssertion.baseline index 6009fb9e67f..2e54c403997 100644 --- a/tests/baselines/reference/completionImportCallAssertion.baseline +++ b/tests/baselines/reference/completionImportCallAssertion.baseline @@ -6,6 +6,7 @@ "name": "0" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -73,6 +74,7 @@ "name": "1" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index 66766ee70be..5dce64b756e 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -6,6 +6,7 @@ "name": "26" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -1339,7 +1340,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -1452,7 +1453,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index af89101b92a..6180976aaba 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -6,6 +6,7 @@ "name": "4" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -754,6 +755,7 @@ "name": "5" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -2367,7 +2369,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -2480,7 +2482,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -4818,6 +4820,7 @@ "name": "7" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -5566,6 +5569,7 @@ "name": "9" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -6314,6 +6318,7 @@ "name": "11" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -7062,6 +7067,7 @@ "name": "12" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -7810,6 +7816,7 @@ "name": "13" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -9423,7 +9430,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -9536,7 +9543,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -11874,6 +11881,7 @@ "name": "16" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -12622,6 +12630,7 @@ "name": "17" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -14235,7 +14244,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -14348,7 +14357,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -16686,6 +16695,7 @@ "name": "19" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -17434,6 +17444,7 @@ "name": "21" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -18182,6 +18193,7 @@ "name": "23" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -18930,6 +18942,7 @@ "name": "24" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -19678,6 +19691,7 @@ "name": "25" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -21291,7 +21305,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -21404,7 +21418,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -23742,6 +23756,7 @@ "name": "29" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -25355,7 +25370,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -25468,7 +25483,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -27806,6 +27821,7 @@ "name": "30" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -28961,6 +28977,7 @@ "name": "31" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -30574,7 +30591,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -30687,7 +30704,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -33025,6 +33042,7 @@ "name": "33" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -34592,7 +34610,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -34705,7 +34723,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -37043,6 +37061,7 @@ "name": "34" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -38198,6 +38217,7 @@ "name": "35" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -39765,7 +39785,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -39878,7 +39898,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -42216,6 +42236,7 @@ "name": "36" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -43371,6 +43392,7 @@ "name": "38" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -44984,7 +45006,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -45097,7 +45119,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -47435,6 +47457,7 @@ "name": "39" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -48590,6 +48613,7 @@ "name": "40" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -50203,7 +50227,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -50316,7 +50340,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -52654,6 +52678,7 @@ "name": "41" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -53809,6 +53834,7 @@ "name": "42" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -55422,7 +55448,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -55535,7 +55561,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -57873,6 +57899,7 @@ "name": "45" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -59481,7 +59508,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -59594,7 +59621,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -61932,6 +61959,7 @@ "name": "49" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -63540,7 +63568,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -63653,7 +63681,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -65991,6 +66019,7 @@ "name": "52" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -67599,7 +67628,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -67712,7 +67741,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -70050,6 +70079,7 @@ "name": "56" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -71658,7 +71688,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -71771,7 +71801,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -74109,6 +74139,7 @@ "name": "59" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -75717,7 +75748,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -75830,7 +75861,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -78168,6 +78199,7 @@ "name": "63" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -79776,7 +79808,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -79889,7 +79921,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -82227,6 +82259,7 @@ "name": "67" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -82610,6 +82643,7 @@ "name": "87" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -84175,7 +84209,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -84288,7 +84322,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -86782,6 +86816,7 @@ "name": "88" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -87937,6 +87972,7 @@ "name": "109" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -89531,7 +89567,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -89644,7 +89680,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -92138,6 +92174,7 @@ "name": "110" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -92362,6 +92399,7 @@ "name": "114" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, @@ -92461,6 +92499,7 @@ "name": "115" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -94142,7 +94181,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -94255,7 +94294,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index 1ec7d5e2072..d4a9a88a0a1 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -6,6 +6,7 @@ "name": "18" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -3202,7 +3203,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -3315,7 +3316,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -5653,6 +5654,7 @@ "name": "15" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -8850,7 +8852,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -8963,7 +8965,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -12096,6 +12098,7 @@ "name": "24" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -15268,7 +15271,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -15381,7 +15384,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -17719,6 +17722,7 @@ "name": "27" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -20812,7 +20816,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -20925,7 +20929,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -23419,6 +23423,7 @@ "name": "39" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -26710,7 +26715,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -26823,7 +26828,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -29161,6 +29166,7 @@ "name": "44" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -32358,7 +32364,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -32471,7 +32477,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -35604,6 +35610,7 @@ "name": "" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -38697,7 +38704,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -38810,7 +38817,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index ae41c9cc50c..3c056e5f263 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -6,6 +6,7 @@ "name": "3" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -1070,7 +1071,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -1183,7 +1184,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -4316,6 +4317,7 @@ "name": "7" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -5341,7 +5343,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -5454,7 +5456,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -7792,6 +7794,7 @@ "name": "9" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -8856,7 +8859,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -8969,7 +8972,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index 9c1bc339283..e153a2ecdaf 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -6,6 +6,7 @@ "name": "2" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -1246,7 +1247,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -1359,7 +1360,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -3853,6 +3854,7 @@ "name": "4" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -5173,7 +5175,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -5286,7 +5288,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -8575,6 +8577,7 @@ "name": "15" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -9790,7 +9793,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -9903,7 +9906,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] @@ -12241,6 +12244,7 @@ "name": "17" }, "completionList": { + "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, "isNewIdentifierLocation": false, @@ -13489,7 +13493,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "A value representing an unencoded URI.", "kind": "text" } ] @@ -13602,7 +13606,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "A value representing an unencoded URI component.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsJSDocTags.baseline b/tests/baselines/reference/completionsJSDocTags.baseline index 4c876248179..945b84dd88b 100644 --- a/tests/baselines/reference/completionsJSDocTags.baseline +++ b/tests/baselines/reference/completionsJSDocTags.baseline @@ -6,6 +6,7 @@ "name": "14" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, diff --git a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline index 4c5bcf2c68d..732ce4a3164 100644 --- a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -6,6 +6,7 @@ "name": "2" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index 327daf9f0d9..0d3fe39d755 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -6,6 +6,7 @@ "name": "1" }, "completionList": { + "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, "isNewIdentifierLocation": false, diff --git a/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.js b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.js new file mode 100644 index 00000000000..9d2e2e71697 --- /dev/null +++ b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.js @@ -0,0 +1,72 @@ +//// [constructorWithParameterPropertiesAndPrivateFields.es2015.ts] +// https://github.com/microsoft/TypeScript/issues/48771 + +class A { + readonly #privateField: string; + + constructor(arg: { key: string }, public exposedField: number) { + ({ key: this.#privateField } = arg); + } + + log() { + console.log(this.#privateField); + console.log(this.exposedField); + } +} + +class B { + readonly #privateField: string; + + constructor(arg: { key: string }, public exposedField: number) { + "prologue"; + ({ key: this.#privateField } = arg); + } + + log() { + console.log(this.#privateField); + console.log(this.exposedField); + } +} + + +//// [constructorWithParameterPropertiesAndPrivateFields.es2015.js] +// https://github.com/microsoft/TypeScript/issues/48771 +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _A_privateField, _B_privateField; +class A { + constructor(arg, exposedField) { + var _a; + this.exposedField = exposedField; + _A_privateField.set(this, void 0); + (_a = this, { key: ({ set value(_b) { __classPrivateFieldSet(_a, _A_privateField, _b, "f"); } }).value } = arg); + } + log() { + console.log(__classPrivateFieldGet(this, _A_privateField, "f")); + console.log(this.exposedField); + } +} +_A_privateField = new WeakMap(); +class B { + constructor(arg, exposedField) { + "prologue"; + var _a; + this.exposedField = exposedField; + _B_privateField.set(this, void 0); + (_a = this, { key: ({ set value(_b) { __classPrivateFieldSet(_a, _B_privateField, _b, "f"); } }).value } = arg); + } + log() { + console.log(__classPrivateFieldGet(this, _B_privateField, "f")); + console.log(this.exposedField); + } +} +_B_privateField = new WeakMap(); diff --git a/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.symbols b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.symbols new file mode 100644 index 00000000000..cffef43438a --- /dev/null +++ b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.symbols @@ -0,0 +1,80 @@ +=== tests/cases/compiler/constructorWithParameterPropertiesAndPrivateFields.es2015.ts === +// https://github.com/microsoft/TypeScript/issues/48771 + +class A { +>A : Symbol(A, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 0, 0)) + + readonly #privateField: string; +>#privateField : Symbol(A.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 2, 9)) + + constructor(arg: { key: string }, public exposedField: number) { +>arg : Symbol(arg, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 14)) +>key : Symbol(key, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 20)) +>exposedField : Symbol(A.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 35)) + + ({ key: this.#privateField } = arg); +>key : Symbol(key, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 6, 6)) +>this.#privateField : Symbol(A.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 2, 9)) +>this : Symbol(A, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 0, 0)) +>arg : Symbol(arg, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 14)) + } + + log() { +>log : Symbol(A.log, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 7, 3)) + + console.log(this.#privateField); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.#privateField : Symbol(A.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 2, 9)) +>this : Symbol(A, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 0, 0)) + + console.log(this.exposedField); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.exposedField : Symbol(A.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 35)) +>this : Symbol(A, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 0, 0)) +>exposedField : Symbol(A.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 5, 35)) + } +} + +class B { +>B : Symbol(B, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 13, 1)) + + readonly #privateField: string; +>#privateField : Symbol(B.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 15, 9)) + + constructor(arg: { key: string }, public exposedField: number) { +>arg : Symbol(arg, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 14)) +>key : Symbol(key, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 20)) +>exposedField : Symbol(B.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 35)) + + "prologue"; + ({ key: this.#privateField } = arg); +>key : Symbol(key, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 20, 6)) +>this.#privateField : Symbol(B.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 15, 9)) +>this : Symbol(B, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 13, 1)) +>arg : Symbol(arg, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 14)) + } + + log() { +>log : Symbol(B.log, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 21, 3)) + + console.log(this.#privateField); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.#privateField : Symbol(B.#privateField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 15, 9)) +>this : Symbol(B, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 13, 1)) + + console.log(this.exposedField); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.exposedField : Symbol(B.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 35)) +>this : Symbol(B, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 13, 1)) +>exposedField : Symbol(B.exposedField, Decl(constructorWithParameterPropertiesAndPrivateFields.es2015.ts, 18, 35)) + } +} + diff --git a/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.types b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.types new file mode 100644 index 00000000000..ea034c2b054 --- /dev/null +++ b/tests/baselines/reference/constructorWithParameterPropertiesAndPrivateFields.es2015.types @@ -0,0 +1,92 @@ +=== tests/cases/compiler/constructorWithParameterPropertiesAndPrivateFields.es2015.ts === +// https://github.com/microsoft/TypeScript/issues/48771 + +class A { +>A : A + + readonly #privateField: string; +>#privateField : string + + constructor(arg: { key: string }, public exposedField: number) { +>arg : { key: string; } +>key : string +>exposedField : number + + ({ key: this.#privateField } = arg); +>({ key: this.#privateField } = arg) : { key: string; } +>{ key: this.#privateField } = arg : { key: string; } +>{ key: this.#privateField } : { key: string; } +>key : string +>this.#privateField : string +>this : this +>arg : { key: string; } + } + + log() { +>log : () => void + + console.log(this.#privateField); +>console.log(this.#privateField) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>this.#privateField : string +>this : this + + console.log(this.exposedField); +>console.log(this.exposedField) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>this.exposedField : number +>this : this +>exposedField : number + } +} + +class B { +>B : B + + readonly #privateField: string; +>#privateField : string + + constructor(arg: { key: string }, public exposedField: number) { +>arg : { key: string; } +>key : string +>exposedField : number + + "prologue"; +>"prologue" : "prologue" + + ({ key: this.#privateField } = arg); +>({ key: this.#privateField } = arg) : { key: string; } +>{ key: this.#privateField } = arg : { key: string; } +>{ key: this.#privateField } : { key: string; } +>key : string +>this.#privateField : string +>this : this +>arg : { key: string; } + } + + log() { +>log : () => void + + console.log(this.#privateField); +>console.log(this.#privateField) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>this.#privateField : string +>this : this + + console.log(this.exposedField); +>console.log(this.exposedField) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>this.exposedField : number +>this : this +>exposedField : number + } +} + diff --git a/tests/baselines/reference/constructorWithSuperAndPrologue.es5.js b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.js new file mode 100644 index 00000000000..a06a4f7a4fa --- /dev/null +++ b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.js @@ -0,0 +1,52 @@ +//// [constructorWithSuperAndPrologue.es5.ts] +// https://github.com/microsoft/TypeScript/issues/48761 +"use strict"; + +class A { + public constructor() { + console.log("A") + } +} + +class B extends A { + constructor() { + "ngInject"; + console.log("B") + super(); + } +} + + +//// [constructorWithSuperAndPrologue.es5.js] +// https://github.com/microsoft/TypeScript/issues/48761 +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + console.log("A"); + } + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B() { + "ngInject"; + console.log("B"); + return _super.call(this) || this; + } + return B; +}(A)); diff --git a/tests/baselines/reference/constructorWithSuperAndPrologue.es5.symbols b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.symbols new file mode 100644 index 00000000000..4ec2815f8a4 --- /dev/null +++ b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/constructorWithSuperAndPrologue.es5.ts === +// https://github.com/microsoft/TypeScript/issues/48761 +"use strict"; + +class A { +>A : Symbol(A, Decl(constructorWithSuperAndPrologue.es5.ts, 1, 13)) + + public constructor() { + console.log("A") +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) + } +} + +class B extends A { +>B : Symbol(B, Decl(constructorWithSuperAndPrologue.es5.ts, 7, 1)) +>A : Symbol(A, Decl(constructorWithSuperAndPrologue.es5.ts, 1, 13)) + + constructor() { + "ngInject"; + console.log("B") +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) + + super(); +>super : Symbol(A, Decl(constructorWithSuperAndPrologue.es5.ts, 1, 13)) + } +} + diff --git a/tests/baselines/reference/constructorWithSuperAndPrologue.es5.types b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.types new file mode 100644 index 00000000000..7e615a1a660 --- /dev/null +++ b/tests/baselines/reference/constructorWithSuperAndPrologue.es5.types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/constructorWithSuperAndPrologue.es5.ts === +// https://github.com/microsoft/TypeScript/issues/48761 +"use strict"; +>"use strict" : "use strict" + +class A { +>A : A + + public constructor() { + console.log("A") +>console.log("A") : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>"A" : "A" + } +} + +class B extends A { +>B : B +>A : A + + constructor() { + "ngInject"; +>"ngInject" : "ngInject" + + console.log("B") +>console.log("B") : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>"B" : "B" + + super(); +>super() : void +>super : typeof A + } +} + diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt new file mode 100644 index 00000000000..080d37c28cb --- /dev/null +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/jsx/0.tsx(6,21): error TS2698: Spread types may only be created from object types. + + +==== tests/cases/conformance/jsx/0.tsx (1 errors) ==== + /// + import * as cx from 'classnames'; + import * as React from "react"; + + let buttonProps; + let k = ; + +==== tests/cases/conformance/jsx/declaration.d.ts (0 errors) ==== + declare module "classnames"; + \ No newline at end of file diff --git a/tests/baselines/reference/dependentDestructuredVariables.errors.txt b/tests/baselines/reference/dependentDestructuredVariables.errors.txt new file mode 100644 index 00000000000..fbddf80744c --- /dev/null +++ b/tests/baselines/reference/dependentDestructuredVariables.errors.txt @@ -0,0 +1,334 @@ +tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts(314,5): error TS7022: 'value1' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts(314,5): error TS7031: Binding element 'value1' implicitly has an 'any' type. + + +==== tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts (2 errors) ==== + type Action = + | { kind: 'A', payload: number } + | { kind: 'B', payload: string }; + + function f10({ kind, payload }: Action) { + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + } + + function f11(action: Action) { + const { kind, payload } = action; + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + } + + function f12({ kind, payload }: Action) { + switch (kind) { + case 'A': + payload.toFixed(); + break; + case 'B': + payload.toUpperCase(); + break; + default: + payload; // never + } + } + + type Action2 = + | { kind: 'A', payload: number | undefined } + | { kind: 'B', payload: string | undefined }; + + function f20({ kind, payload }: Action2) { + if (payload) { + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + } + } + + function f21(action: Action2) { + const { kind, payload } = action; + if (payload) { + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + } + } + + function f22(action: Action2) { + if (action.payload) { + const { kind, payload } = action; + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + } + } + + function f23({ kind, payload }: Action2) { + if (payload) { + switch (kind) { + case 'A': + payload.toFixed(); + break; + case 'B': + payload.toUpperCase(); + break; + default: + payload; // never + } + } + } + + type Foo = + | { kind: 'A', isA: true } + | { kind: 'B', isA: false } + | { kind: 'C', isA: false }; + + function f30({ kind, isA }: Foo) { + if (kind === 'A') { + isA; // true + } + if (kind === 'B') { + isA; // false + } + if (kind === 'C') { + isA; // false + } + if (isA) { + kind; // 'A' + } + else { + kind; // 'B' | 'C' + } + } + + type Args = ['A', number] | ['B', string] + + function f40(...[kind, data]: Args) { + if (kind === 'A') { + data.toFixed(); + } + if (kind === 'B') { + data.toUpperCase(); + } + } + + // Repro from #35283 + + interface A { variant: 'a', value: T } + + interface B { variant: 'b', value: Array } + + type AB = A | B; + + declare function printValue(t: T): void; + + declare function printValueList(t: Array): void; + + function unrefined1(ab: AB): void { + const { variant, value } = ab; + if (variant === 'a') { + printValue(value); + } + else { + printValueList(value); + } + } + + // Repro from #38020 + + type Action3 = + | {type: 'add', payload: { toAdd: number } } + | {type: 'remove', payload: { toRemove: number } }; + + const reducerBroken = (state: number, { type, payload }: Action3) => { + switch (type) { + case 'add': + return state + payload.toAdd; + case 'remove': + return state - payload.toRemove; + } + } + + // Repro from #46143 + + declare var it: Iterator; + const { value, done } = it.next(); + if (!done) { + value; // number + } + + // Repro from #46658 + + declare function f50(cb: (...args: Args) => void): void + + f50((kind, data) => { + if (kind === 'A') { + data.toFixed(); + } + if (kind === 'B') { + data.toUpperCase(); + } + }); + + const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) => { + if (kind === 'A') { + payload.toFixed(); + } + if (kind === 'B') { + payload.toUpperCase(); + } + }; + + const f52: (...args: ['A', number] | ['B']) => void = (kind, payload?) => { + if (kind === 'A') { + payload.toFixed(); + } + else { + payload; // undefined + } + }; + + declare function readFile(path: string, callback: (...args: [err: null, data: unknown[]] | [err: Error, data: undefined]) => void): void; + + readFile('hello', (err, data) => { + if (err === null) { + data.length; + } + else { + err.message; + } + }); + + type ReducerArgs = ["add", { a: number, b: number }] | ["concat", { firstArr: any[], secondArr: any[] }]; + + const reducer: (...args: ReducerArgs) => void = (op, args) => { + switch (op) { + case "add": + console.log(args.a + args.b); + break; + case "concat": + console.log(args.firstArr.concat(args.secondArr)); + break; + } + } + + reducer("add", { a: 1, b: 3 }); + reducer("concat", { firstArr: [1, 2], secondArr: [3, 4] }); + + // repro from https://github.com/microsoft/TypeScript/pull/47190#issuecomment-1057603588 + + type FooMethod = { + method(...args: + [type: "str", cb: (e: string) => void] | + [type: "num", cb: (e: number) => void] + ): void; + } + + let fooM: FooMethod = { + method(type, cb) { + if (type == 'num') { + cb(123) + } else { + cb("abc") + } + } + }; + + type FooAsyncMethod = { + method(...args: + [type: "str", cb: (e: string) => void] | + [type: "num", cb: (e: number) => void] + ): Promise; + } + + let fooAsyncM: FooAsyncMethod = { + async method(type, cb) { + if (type == 'num') { + cb(123) + } else { + cb("abc") + } + } + }; + + type FooGenMethod = { + method(...args: + [type: "str", cb: (e: string) => void] | + [type: "num", cb: (e: number) => void] + ): Generator; + } + + let fooGenM: FooGenMethod = { + *method(type, cb) { + if (type == 'num') { + cb(123) + } else { + cb("abc") + } + } + }; + + type FooAsyncGenMethod = { + method(...args: + [type: "str", cb: (e: string) => void] | + [type: "num", cb: (e: number) => void] + ): AsyncGenerator; + } + + let fooAsyncGenM: FooAsyncGenMethod = { + async *method(type, cb) { + if (type == 'num') { + cb(123) + } else { + cb("abc") + } + } + }; + + // Repro from #48345 + + type Func = (...args: T) => void; + + const f60: Func = (kind, payload) => { + if (kind === "a") { + payload.toFixed(); // error + } + if (kind === "b") { + payload.toUpperCase(); // error + } + }; + + // Repro from #48902 + + function foo({ + value1, + ~~~~~~ +!!! error TS7022: 'value1' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. + ~~~~~~ +!!! error TS7031: Binding element 'value1' implicitly has an 'any' type. + test1 = value1.test1, + test2 = value1.test2, + test3 = value1.test3, + test4 = value1.test4, + test5 = value1.test5, + test6 = value1.test6, + test7 = value1.test7, + test8 = value1.test8, + test9 = value1.test9 + }) {} + \ No newline at end of file diff --git a/tests/baselines/reference/dependentDestructuredVariables.js b/tests/baselines/reference/dependentDestructuredVariables.js index a9f2006ec1e..eab12767faf 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.js +++ b/tests/baselines/reference/dependentDestructuredVariables.js @@ -308,6 +308,21 @@ const f60: Func = (kind, payload) => { payload.toUpperCase(); // error } }; + +// Repro from #48902 + +function foo({ + value1, + test1 = value1.test1, + test2 = value1.test2, + test3 = value1.test3, + test4 = value1.test4, + test5 = value1.test5, + test6 = value1.test6, + test7 = value1.test7, + test8 = value1.test8, + test9 = value1.test9 +}) {} //// [dependentDestructuredVariables.js] @@ -550,6 +565,8 @@ const f60 = (kind, payload) => { payload.toUpperCase(); // error } }; +// Repro from #48902 +function foo({ value1, test1 = value1.test1, test2 = value1.test2, test3 = value1.test3, test4 = value1.test4, test5 = value1.test5, test6 = value1.test6, test7 = value1.test7, test8 = value1.test8, test9 = value1.test9 }) { } //// [dependentDestructuredVariables.d.ts] @@ -667,3 +684,15 @@ declare type FooAsyncGenMethod = { declare let fooAsyncGenM: FooAsyncGenMethod; declare type Func = (...args: T) => void; declare const f60: Func; +declare function foo({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { + value1: any; + test1?: any; + test2?: any; + test3?: any; + test4?: any; + test5?: any; + test6?: any; + test7?: any; + test8?: any; + test9?: any; +}): void; diff --git a/tests/baselines/reference/dependentDestructuredVariables.symbols b/tests/baselines/reference/dependentDestructuredVariables.symbols index f859b5ee756..ccaaaa72fe9 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.symbols +++ b/tests/baselines/reference/dependentDestructuredVariables.symbols @@ -784,3 +784,49 @@ const f60: Func = (kind, payload) => { } }; +// Repro from #48902 + +function foo({ +>foo : Symbol(foo, Decl(dependentDestructuredVariables.ts, 308, 2)) + + value1, +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test1 = value1.test1, +>test1 : Symbol(test1, Decl(dependentDestructuredVariables.ts, 313, 11)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test2 = value1.test2, +>test2 : Symbol(test2, Decl(dependentDestructuredVariables.ts, 314, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test3 = value1.test3, +>test3 : Symbol(test3, Decl(dependentDestructuredVariables.ts, 315, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test4 = value1.test4, +>test4 : Symbol(test4, Decl(dependentDestructuredVariables.ts, 316, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test5 = value1.test5, +>test5 : Symbol(test5, Decl(dependentDestructuredVariables.ts, 317, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test6 = value1.test6, +>test6 : Symbol(test6, Decl(dependentDestructuredVariables.ts, 318, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test7 = value1.test7, +>test7 : Symbol(test7, Decl(dependentDestructuredVariables.ts, 319, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test8 = value1.test8, +>test8 : Symbol(test8, Decl(dependentDestructuredVariables.ts, 320, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + + test9 = value1.test9 +>test9 : Symbol(test9, Decl(dependentDestructuredVariables.ts, 321, 25)) +>value1 : Symbol(value1, Decl(dependentDestructuredVariables.ts, 312, 14)) + +}) {} + diff --git a/tests/baselines/reference/dependentDestructuredVariables.types b/tests/baselines/reference/dependentDestructuredVariables.types index 440c42a3827..f3f90242313 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.types +++ b/tests/baselines/reference/dependentDestructuredVariables.types @@ -891,3 +891,67 @@ const f60: Func = (kind, payload) => { } }; +// Repro from #48902 + +function foo({ +>foo : ({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { value1: any; test1?: any; test2?: any; test3?: any; test4?: any; test5?: any; test6?: any; test7?: any; test8?: any; test9?: any; }) => void + + value1, +>value1 : any + + test1 = value1.test1, +>test1 : any +>value1.test1 : any +>value1 : any +>test1 : any + + test2 = value1.test2, +>test2 : any +>value1.test2 : any +>value1 : any +>test2 : any + + test3 = value1.test3, +>test3 : any +>value1.test3 : any +>value1 : any +>test3 : any + + test4 = value1.test4, +>test4 : any +>value1.test4 : any +>value1 : any +>test4 : any + + test5 = value1.test5, +>test5 : any +>value1.test5 : any +>value1 : any +>test5 : any + + test6 = value1.test6, +>test6 : any +>value1.test6 : any +>value1 : any +>test6 : any + + test7 = value1.test7, +>test7 : any +>value1.test7 : any +>value1 : any +>test7 : any + + test8 = value1.test8, +>test8 : any +>value1.test8 : any +>value1 : any +>test8 : any + + test9 = value1.test9 +>test9 : any +>value1.test9 : any +>value1 : any +>test9 : any + +}) {} + diff --git a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.errors.txt b/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.errors.txt deleted file mode 100644 index cabda9caa7e..00000000000 --- a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.errors.txt +++ /dev/null @@ -1,47 +0,0 @@ -tests/cases/compiler/index.ts(8,23): error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. -tests/cases/compiler/index.ts(14,8): error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. -tests/cases/compiler/index.ts(20,28): error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. - - -==== tests/cases/compiler/type1.ts (0 errors) ==== - interface T1 {} - export type { T1 } - -==== tests/cases/compiler/type2.ts (0 errors) ==== - export interface T2 {} - -==== tests/cases/compiler/class3.ts (0 errors) ==== - export class C3 {} - -==== tests/cases/compiler/index.ts (3 errors) ==== - import { T1 } from "./type1"; - import type { T2 } from "./type2"; - import { C3 } from "./class3"; - declare var EventListener: any; - - class HelloWorld { - @EventListener('1') - handleEvent1(event: T1) {} // Error - ~~ -!!! error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. -!!! related TS1376 tests/cases/compiler/index.ts:1:10: 'T1' was imported here. - - @EventListener('2') - handleEvent2(event: T2) {} // Ok - - @EventListener('1') - p1!: T1; // Error - ~~ -!!! error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. -!!! related TS1376 tests/cases/compiler/index.ts:1:10: 'T1' was imported here. - - @EventListener('2') - p2!: T2; // Ok - - @EventListener('3') - handleEvent3(event: C3): T1 { return undefined! } // Ok, Error - ~~ -!!! error TS1267: A type referenced in a decorated signature must be imported with 'import type' when 'isolatedModules' and 'emitDecoratorMetadata' are enabled. -!!! related TS1376 tests/cases/compiler/index.ts:1:10: 'T1' was imported here. - } - \ No newline at end of file diff --git a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.js b/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.js deleted file mode 100644 index bb5e71383f4..00000000000 --- a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.js +++ /dev/null @@ -1,99 +0,0 @@ -//// [tests/cases/compiler/emitDecoratorMetadata_isolatedModules.ts] //// - -//// [type1.ts] -interface T1 {} -export type { T1 } - -//// [type2.ts] -export interface T2 {} - -//// [class3.ts] -export class C3 {} - -//// [index.ts] -import { T1 } from "./type1"; -import type { T2 } from "./type2"; -import { C3 } from "./class3"; -declare var EventListener: any; - -class HelloWorld { - @EventListener('1') - handleEvent1(event: T1) {} // Error - - @EventListener('2') - handleEvent2(event: T2) {} // Ok - - @EventListener('1') - p1!: T1; // Error - - @EventListener('2') - p2!: T2; // Ok - - @EventListener('3') - handleEvent3(event: C3): T1 { return undefined! } // Ok, Error -} - - -//// [type1.js] -"use strict"; -exports.__esModule = true; -//// [type2.js] -"use strict"; -exports.__esModule = true; -//// [class3.js] -"use strict"; -exports.__esModule = true; -exports.C3 = void 0; -var C3 = /** @class */ (function () { - function C3() { - } - return C3; -}()); -exports.C3 = C3; -//// [index.js] -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -exports.__esModule = true; -var class3_1 = require("./class3"); -var HelloWorld = /** @class */ (function () { - function HelloWorld() { - } - HelloWorld.prototype.handleEvent1 = function (event) { }; // Error - HelloWorld.prototype.handleEvent2 = function (event) { }; // Ok - HelloWorld.prototype.handleEvent3 = function (event) { return undefined; }; // Ok, Error - __decorate([ - EventListener('1'), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", void 0) - ], HelloWorld.prototype, "handleEvent1"); - __decorate([ - EventListener('2'), - __metadata("design:type", Function), - __metadata("design:paramtypes", [Object]), - __metadata("design:returntype", void 0) - ], HelloWorld.prototype, "handleEvent2"); - __decorate([ - EventListener('1'), - __metadata("design:type", Object) - ], HelloWorld.prototype, "p1"); - __decorate([ - EventListener('2'), - __metadata("design:type", Object) - ], HelloWorld.prototype, "p2"); - __decorate([ - EventListener('3'), - __metadata("design:type", Function), - __metadata("design:paramtypes", [class3_1.C3]), - __metadata("design:returntype", Object) - ], HelloWorld.prototype, "handleEvent3"); - return HelloWorld; -}()); diff --git a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.symbols b/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.symbols deleted file mode 100644 index c957b1781e3..00000000000 --- a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.symbols +++ /dev/null @@ -1,72 +0,0 @@ -=== tests/cases/compiler/type1.ts === -interface T1 {} ->T1 : Symbol(T1, Decl(type1.ts, 0, 0)) - -export type { T1 } ->T1 : Symbol(T1, Decl(type1.ts, 1, 13)) - -=== tests/cases/compiler/type2.ts === -export interface T2 {} ->T2 : Symbol(T2, Decl(type2.ts, 0, 0)) - -=== tests/cases/compiler/class3.ts === -export class C3 {} ->C3 : Symbol(C3, Decl(class3.ts, 0, 0)) - -=== tests/cases/compiler/index.ts === -import { T1 } from "./type1"; ->T1 : Symbol(T1, Decl(index.ts, 0, 8)) - -import type { T2 } from "./type2"; ->T2 : Symbol(T2, Decl(index.ts, 1, 13)) - -import { C3 } from "./class3"; ->C3 : Symbol(C3, Decl(index.ts, 2, 8)) - -declare var EventListener: any; ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - -class HelloWorld { ->HelloWorld : Symbol(HelloWorld, Decl(index.ts, 3, 31)) - - @EventListener('1') ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - - handleEvent1(event: T1) {} // Error ->handleEvent1 : Symbol(HelloWorld.handleEvent1, Decl(index.ts, 5, 18)) ->event : Symbol(event, Decl(index.ts, 7, 15)) ->T1 : Symbol(T1, Decl(index.ts, 0, 8)) - - @EventListener('2') ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - - handleEvent2(event: T2) {} // Ok ->handleEvent2 : Symbol(HelloWorld.handleEvent2, Decl(index.ts, 7, 28)) ->event : Symbol(event, Decl(index.ts, 10, 15)) ->T2 : Symbol(T2, Decl(index.ts, 1, 13)) - - @EventListener('1') ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - - p1!: T1; // Error ->p1 : Symbol(HelloWorld.p1, Decl(index.ts, 10, 28)) ->T1 : Symbol(T1, Decl(index.ts, 0, 8)) - - @EventListener('2') ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - - p2!: T2; // Ok ->p2 : Symbol(HelloWorld.p2, Decl(index.ts, 13, 10)) ->T2 : Symbol(T2, Decl(index.ts, 1, 13)) - - @EventListener('3') ->EventListener : Symbol(EventListener, Decl(index.ts, 3, 11)) - - handleEvent3(event: C3): T1 { return undefined! } // Ok, Error ->handleEvent3 : Symbol(HelloWorld.handleEvent3, Decl(index.ts, 16, 10)) ->event : Symbol(event, Decl(index.ts, 19, 15)) ->C3 : Symbol(C3, Decl(index.ts, 2, 8)) ->T1 : Symbol(T1, Decl(index.ts, 0, 8)) ->undefined : Symbol(undefined) -} - diff --git a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.types b/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.types deleted file mode 100644 index 0048771bb4e..00000000000 --- a/tests/baselines/reference/emitDecoratorMetadata_isolatedModules.types +++ /dev/null @@ -1,74 +0,0 @@ -=== tests/cases/compiler/type1.ts === -interface T1 {} -export type { T1 } ->T1 : T1 - -=== tests/cases/compiler/type2.ts === -export interface T2 {} -No type information for this code. -No type information for this code.=== tests/cases/compiler/class3.ts === -export class C3 {} ->C3 : C3 - -=== tests/cases/compiler/index.ts === -import { T1 } from "./type1"; ->T1 : any - -import type { T2 } from "./type2"; ->T2 : T2 - -import { C3 } from "./class3"; ->C3 : typeof C3 - -declare var EventListener: any; ->EventListener : any - -class HelloWorld { ->HelloWorld : HelloWorld - - @EventListener('1') ->EventListener('1') : any ->EventListener : any ->'1' : "1" - - handleEvent1(event: T1) {} // Error ->handleEvent1 : (event: T1) => void ->event : T1 - - @EventListener('2') ->EventListener('2') : any ->EventListener : any ->'2' : "2" - - handleEvent2(event: T2) {} // Ok ->handleEvent2 : (event: T2) => void ->event : T2 - - @EventListener('1') ->EventListener('1') : any ->EventListener : any ->'1' : "1" - - p1!: T1; // Error ->p1 : T1 - - @EventListener('2') ->EventListener('2') : any ->EventListener : any ->'2' : "2" - - p2!: T2; // Ok ->p2 : T2 - - @EventListener('3') ->EventListener('3') : any ->EventListener : any ->'3' : "3" - - handleEvent3(event: C3): T1 { return undefined! } // Ok, Error ->handleEvent3 : (event: C3) => T1 ->event : C3 ->undefined! : undefined ->undefined : undefined -} - diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node12).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js similarity index 100% rename from tests/baselines/reference/emitHelpersWithLocalCollisions(module=node12).js rename to tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js diff --git a/tests/baselines/reference/exportDefaultExpressionComments.js b/tests/baselines/reference/exportDefaultExpressionComments.js new file mode 100644 index 00000000000..c3a9bb61da6 --- /dev/null +++ b/tests/baselines/reference/exportDefaultExpressionComments.js @@ -0,0 +1,22 @@ +//// [exportDefaultExpressionComments.ts] +/** + * JSDoc Comments + */ +export default null + + +//// [exportDefaultExpressionComments.js] +"use strict"; +exports.__esModule = true; +/** + * JSDoc Comments + */ +exports["default"] = null; + + +//// [exportDefaultExpressionComments.d.ts] +/** + * JSDoc Comments + */ +declare const _default: any; +export default _default; diff --git a/tests/baselines/reference/exportDefaultExpressionComments.symbols b/tests/baselines/reference/exportDefaultExpressionComments.symbols new file mode 100644 index 00000000000..a3a94331a56 --- /dev/null +++ b/tests/baselines/reference/exportDefaultExpressionComments.symbols @@ -0,0 +1,7 @@ +=== tests/cases/conformance/declarationEmit/exportDefaultExpressionComments.ts === +/** +No type information for this code. * JSDoc Comments +No type information for this code. */ +No type information for this code.export default null +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultExpressionComments.types b/tests/baselines/reference/exportDefaultExpressionComments.types new file mode 100644 index 00000000000..012b8d32555 --- /dev/null +++ b/tests/baselines/reference/exportDefaultExpressionComments.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/declarationEmit/exportDefaultExpressionComments.ts === +/** + * JSDoc Comments + */ +export default null +>null : null + diff --git a/tests/baselines/reference/genericUnboundedTypeParamAssignability.errors.txt b/tests/baselines/reference/genericUnboundedTypeParamAssignability.errors.txt index 6d7b87ebd33..b00dfc3c328 100644 --- a/tests/baselines/reference/genericUnboundedTypeParamAssignability.errors.txt +++ b/tests/baselines/reference/genericUnboundedTypeParamAssignability.errors.txt @@ -1,10 +1,8 @@ tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(2,5): error TS2339: Property 'toString' does not exist on type 'T'. -tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(15,6): error TS2345: Argument of type 'T' is not assignable to parameter of type '{}'. -tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(16,6): error TS2345: Argument of type 'T' is not assignable to parameter of type 'Record'. tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(17,5): error TS2339: Property 'toString' does not exist on type 'T'. -==== tests/cases/compiler/genericUnboundedTypeParamAssignability.ts (4 errors) ==== +==== tests/cases/compiler/genericUnboundedTypeParamAssignability.ts (2 errors) ==== function f1(o: T) { o.toString(); // error ~~~~~~~~ @@ -22,13 +20,7 @@ tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(17,5): error TS23 function user(t: T) { f1(t); f2(t); // error in strict, unbounded T doesn't satisfy the constraint - ~ -!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '{}'. -!!! related TS2208 tests/cases/compiler/genericUnboundedTypeParamAssignability.ts:13:15: This type parameter probably needs an `extends object` constraint. f3(t); // error in strict, unbounded T doesn't satisfy the constraint - ~ -!!! error TS2345: Argument of type 'T' is not assignable to parameter of type 'Record'. -!!! related TS2208 tests/cases/compiler/genericUnboundedTypeParamAssignability.ts:13:15: This type parameter probably needs an `extends object` constraint. t.toString(); // error, for the same reason as f1() ~~~~~~~~ !!! error TS2339: Property 'toString' does not exist on type 'T'. diff --git a/tests/baselines/reference/globalThisAmbientModules.errors.txt b/tests/baselines/reference/globalThisAmbientModules.errors.txt new file mode 100644 index 00000000000..b29d977475f --- /dev/null +++ b/tests/baselines/reference/globalThisAmbientModules.errors.txt @@ -0,0 +1,21 @@ +tests/cases/conformance/es2019/globalThisAmbientModules.ts(8,39): error TS2339: Property '"ambientModule"' does not exist on type 'typeof globalThis'. +tests/cases/conformance/es2019/globalThisAmbientModules.ts(11,33): error TS2339: Property '"ambientModule"' does not exist on type 'typeof globalThis'. + + +==== tests/cases/conformance/es2019/globalThisAmbientModules.ts (2 errors) ==== + declare module "ambientModule" { + export type typ = 1 + export var val: typ + } + namespace valueModule { export var val = 1 } + namespace namespaceModule { export type typ = 1 } + // should error + type GlobalBad1 = (typeof globalThis)["\"ambientModule\""] + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property '"ambientModule"' does not exist on type 'typeof globalThis'. + type GlobalOk1 = (typeof globalThis)["valueModule"] + type GlobalOk2 = globalThis.namespaceModule.typ + const bad1: (typeof globalThis)["\"ambientModule\""] = 'ambientModule' + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property '"ambientModule"' does not exist on type 'typeof globalThis'. + \ No newline at end of file diff --git a/tests/baselines/reference/globalThisAmbientModules.js b/tests/baselines/reference/globalThisAmbientModules.js new file mode 100644 index 00000000000..ec032568e9b --- /dev/null +++ b/tests/baselines/reference/globalThisAmbientModules.js @@ -0,0 +1,20 @@ +//// [globalThisAmbientModules.ts] +declare module "ambientModule" { + export type typ = 1 + export var val: typ +} +namespace valueModule { export var val = 1 } +namespace namespaceModule { export type typ = 1 } +// should error +type GlobalBad1 = (typeof globalThis)["\"ambientModule\""] +type GlobalOk1 = (typeof globalThis)["valueModule"] +type GlobalOk2 = globalThis.namespaceModule.typ +const bad1: (typeof globalThis)["\"ambientModule\""] = 'ambientModule' + + +//// [globalThisAmbientModules.js] +var valueModule; +(function (valueModule) { + valueModule.val = 1; +})(valueModule || (valueModule = {})); +var bad1 = 'ambientModule'; diff --git a/tests/baselines/reference/globalThisAmbientModules.symbols b/tests/baselines/reference/globalThisAmbientModules.symbols new file mode 100644 index 00000000000..f27f2461baa --- /dev/null +++ b/tests/baselines/reference/globalThisAmbientModules.symbols @@ -0,0 +1,38 @@ +=== tests/cases/conformance/es2019/globalThisAmbientModules.ts === +declare module "ambientModule" { +>"ambientModule" : Symbol("ambientModule", Decl(globalThisAmbientModules.ts, 0, 0)) + + export type typ = 1 +>typ : Symbol(typ, Decl(globalThisAmbientModules.ts, 0, 32)) + + export var val: typ +>val : Symbol(val, Decl(globalThisAmbientModules.ts, 2, 14)) +>typ : Symbol(typ, Decl(globalThisAmbientModules.ts, 0, 32)) +} +namespace valueModule { export var val = 1 } +>valueModule : Symbol(valueModule, Decl(globalThisAmbientModules.ts, 3, 1)) +>val : Symbol(val, Decl(globalThisAmbientModules.ts, 4, 34)) + +namespace namespaceModule { export type typ = 1 } +>namespaceModule : Symbol(namespaceModule, Decl(globalThisAmbientModules.ts, 4, 44)) +>typ : Symbol(typ, Decl(globalThisAmbientModules.ts, 5, 27)) + +// should error +type GlobalBad1 = (typeof globalThis)["\"ambientModule\""] +>GlobalBad1 : Symbol(GlobalBad1, Decl(globalThisAmbientModules.ts, 5, 49)) +>globalThis : Symbol(globalThis) + +type GlobalOk1 = (typeof globalThis)["valueModule"] +>GlobalOk1 : Symbol(GlobalOk1, Decl(globalThisAmbientModules.ts, 7, 58)) +>globalThis : Symbol(globalThis) + +type GlobalOk2 = globalThis.namespaceModule.typ +>GlobalOk2 : Symbol(GlobalOk2, Decl(globalThisAmbientModules.ts, 8, 51)) +>globalThis : Symbol(globalThis) +>namespaceModule : Symbol(namespaceModule, Decl(globalThisAmbientModules.ts, 4, 44)) +>typ : Symbol(namespaceModule.typ, Decl(globalThisAmbientModules.ts, 5, 27)) + +const bad1: (typeof globalThis)["\"ambientModule\""] = 'ambientModule' +>bad1 : Symbol(bad1, Decl(globalThisAmbientModules.ts, 10, 5)) +>globalThis : Symbol(globalThis) + diff --git a/tests/baselines/reference/globalThisAmbientModules.types b/tests/baselines/reference/globalThisAmbientModules.types new file mode 100644 index 00000000000..9357ee67ead --- /dev/null +++ b/tests/baselines/reference/globalThisAmbientModules.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/es2019/globalThisAmbientModules.ts === +declare module "ambientModule" { +>"ambientModule" : typeof import("ambientModule") + + export type typ = 1 +>typ : 1 + + export var val: typ +>val : 1 +} +namespace valueModule { export var val = 1 } +>valueModule : typeof valueModule +>val : number +>1 : 1 + +namespace namespaceModule { export type typ = 1 } +>typ : 1 + +// should error +type GlobalBad1 = (typeof globalThis)["\"ambientModule\""] +>GlobalBad1 : any +>globalThis : typeof globalThis + +type GlobalOk1 = (typeof globalThis)["valueModule"] +>GlobalOk1 : typeof valueModule +>globalThis : typeof globalThis + +type GlobalOk2 = globalThis.namespaceModule.typ +>GlobalOk2 : 1 +>globalThis : any +>namespaceModule : any + +const bad1: (typeof globalThis)["\"ambientModule\""] = 'ambientModule' +>bad1 : any +>globalThis : typeof globalThis +>'ambientModule' : "ambientModule" + diff --git a/tests/baselines/reference/importAssertion1(module=commonjs).errors.txt b/tests/baselines/reference/importAssertion1(module=commonjs).errors.txt index fa365df88cd..b7a88e8ce62 100644 --- a/tests/baselines/reference/importAssertion1(module=commonjs).errors.txt +++ b/tests/baselines/reference/importAssertion1(module=commonjs).errors.txt @@ -3,14 +3,14 @@ tests/cases/conformance/importAssertion/1.ts(2,28): error TS2821: Import asserti tests/cases/conformance/importAssertion/1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. tests/cases/conformance/importAssertion/2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. tests/cases/conformance/importAssertion/2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. tests/cases/conformance/importAssertion/3.ts(8,11): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments -tests/cases/conformance/importAssertion/3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. tests/cases/conformance/importAssertion/3.ts(10,52): error TS1009: Trailing comma not allowed. @@ -49,29 +49,29 @@ tests/cases/conformance/importAssertion/3.ts(10,52): error TS1009: Trailing comm const a = import('./0') const b = import('./0', { assert: { type: "json" } }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. const c = import('./0', { assert: { type: "json", ttype: "typo" } }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. const d = import('./0', { assert: {} }) ~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. const dd = import('./0', {}) ~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. declare function foo(): any; const e = import('./0', foo()) ~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. const f = import() ~~~~~~~~ !!! message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments const g = import('./0', {}, {}) ~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. const h = import('./0', { assert: { type: "json" }},) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. ~ !!! error TS1009: Trailing comma not allowed. diff --git a/tests/baselines/reference/importAssertion1(module=es2015).errors.txt b/tests/baselines/reference/importAssertion1(module=es2015).errors.txt index fb959409350..266938cb7cd 100644 --- a/tests/baselines/reference/importAssertion1(module=es2015).errors.txt +++ b/tests/baselines/reference/importAssertion1(module=es2015).errors.txt @@ -3,15 +3,15 @@ tests/cases/conformance/importAssertion/1.ts(2,28): error TS2821: Import asserti tests/cases/conformance/importAssertion/1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. tests/cases/conformance/importAssertion/2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. tests/cases/conformance/importAssertion/2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/importAssertion/3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/importAssertion/3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ==== tests/cases/conformance/importAssertion/0.ts (0 errors) ==== @@ -48,31 +48,31 @@ tests/cases/conformance/importAssertion/3.ts(10,11): error TS1323: Dynamic impor ==== tests/cases/conformance/importAssertion/3.ts (9 errors) ==== const a = import('./0') ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const b = import('./0', { assert: { type: "json" } }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const c = import('./0', { assert: { type: "json", ttype: "typo" } }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const d = import('./0', { assert: {} }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const dd = import('./0', {}) ~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. declare function foo(): any; const e = import('./0', foo()) ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const f = import() ~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const g = import('./0', {}, {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. const h = import('./0', { assert: { type: "json" }},) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt index 43821679002..5fbfb92fa50 100644 --- a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt +++ b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== @@ -9,10 +9,10 @@ tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic imports ==== tests/cases/conformance/dynamicImport/1.ts (3 errors) ==== import("./0"); ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. var p1 = import("./0"); ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. p1.then(zero => { return zero.foo(); }) @@ -20,5 +20,5 @@ tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic imports function foo() { const p2 = import("./0"); ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt index 063b200b672..ee698678c3c 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt +++ b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Argument of dynamic import cannot be spread element. tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'. @@ -25,6 +25,6 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): ~~~~~~~~~~~~~~ !!! error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations. ~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. ~~~~~~~~~~~~~~ !!! error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt b/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt index 5e37388bc02..de342b78047 100644 --- a/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt +++ b/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ==== @@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic impo async function foo() { return await import((await import("./foo")).default); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt b/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt index 5e37388bc02..de342b78047 100644 --- a/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt +++ b/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. -tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. +tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ==== @@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic impo async function foo() { return await import((await import("./foo")).default); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. ~~~~~~~~~~~~~~~ -!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'. +!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'. } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt index 65b8a2d631e..53920e46540 100644 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments. -tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments. +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. +tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. ==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== @@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import c "use strict" var p1 = import>("./0"); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1326: Dynamic import cannot have type arguments. +!!! error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. var p2 = import<>("./0"); // error ~~~~~~~~~~~~~~~ -!!! error TS1326: Dynamic import cannot have type arguments. \ No newline at end of file +!!! error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/importElisionEnum.js b/tests/baselines/reference/importElisionEnum.js new file mode 100644 index 00000000000..31c9a5bd8f6 --- /dev/null +++ b/tests/baselines/reference/importElisionEnum.js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/importElisionEnum.ts] //// + +//// [enum.ts] +export enum MyEnum { + a = 0, + b, + c, + d +} + +//// [index.ts] +import { MyEnum as MyEnumFromModule } from "./enum"; + +enum MyEnum { + a = MyEnumFromModule.a +} + +//// [enum.js] +"use strict"; +exports.__esModule = true; +exports.MyEnum = void 0; +var MyEnum; +(function (MyEnum) { + MyEnum[MyEnum["a"] = 0] = "a"; + MyEnum[MyEnum["b"] = 1] = "b"; + MyEnum[MyEnum["c"] = 2] = "c"; + MyEnum[MyEnum["d"] = 3] = "d"; +})(MyEnum = exports.MyEnum || (exports.MyEnum = {})); +//// [index.js] +"use strict"; +exports.__esModule = true; +var MyEnum; +(function (MyEnum) { + MyEnum[MyEnum["a"] = 0] = "a"; +})(MyEnum || (MyEnum = {})); diff --git a/tests/baselines/reference/importElisionEnum.symbols b/tests/baselines/reference/importElisionEnum.symbols new file mode 100644 index 00000000000..5e81a547d67 --- /dev/null +++ b/tests/baselines/reference/importElisionEnum.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/enum.ts === +export enum MyEnum { +>MyEnum : Symbol(MyEnum, Decl(enum.ts, 0, 0)) + + a = 0, +>a : Symbol(MyEnum.a, Decl(enum.ts, 0, 20)) + + b, +>b : Symbol(MyEnum.b, Decl(enum.ts, 1, 8)) + + c, +>c : Symbol(MyEnum.c, Decl(enum.ts, 2, 4)) + + d +>d : Symbol(MyEnum.d, Decl(enum.ts, 3, 4)) +} + +=== tests/cases/compiler/index.ts === +import { MyEnum as MyEnumFromModule } from "./enum"; +>MyEnum : Symbol(MyEnumFromModule, Decl(enum.ts, 0, 0)) +>MyEnumFromModule : Symbol(MyEnumFromModule, Decl(index.ts, 0, 8)) + +enum MyEnum { +>MyEnum : Symbol(MyEnum, Decl(index.ts, 0, 52)) + + a = MyEnumFromModule.a +>a : Symbol(MyEnum.a, Decl(index.ts, 2, 13)) +>MyEnumFromModule.a : Symbol(MyEnumFromModule.a, Decl(enum.ts, 0, 20)) +>MyEnumFromModule : Symbol(MyEnumFromModule, Decl(index.ts, 0, 8)) +>a : Symbol(MyEnumFromModule.a, Decl(enum.ts, 0, 20)) +} diff --git a/tests/baselines/reference/importElisionEnum.types b/tests/baselines/reference/importElisionEnum.types new file mode 100644 index 00000000000..17e8b874bf0 --- /dev/null +++ b/tests/baselines/reference/importElisionEnum.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/enum.ts === +export enum MyEnum { +>MyEnum : MyEnum + + a = 0, +>a : MyEnum.a +>0 : 0 + + b, +>b : MyEnum.b + + c, +>c : MyEnum.c + + d +>d : MyEnum.d +} + +=== tests/cases/compiler/index.ts === +import { MyEnum as MyEnumFromModule } from "./enum"; +>MyEnum : typeof MyEnumFromModule +>MyEnumFromModule : typeof MyEnumFromModule + +enum MyEnum { +>MyEnum : MyEnum + + a = MyEnumFromModule.a +>a : MyEnum +>MyEnumFromModule.a : MyEnumFromModule.a +>MyEnumFromModule : typeof MyEnumFromModule +>a : MyEnumFromModule.a +} diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=es5).errors.txt b/tests/baselines/reference/importMeta(module=commonjs,target=es5).errors.txt index 9c82043ec74..2f65f3fc12c 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=es5).errors.txt +++ b/tests/baselines/reference/importMeta(module=commonjs,target=es5).errors.txt @@ -1,25 +1,25 @@ error TS2468: Cannot find global value 'Promise'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,22): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? @@ -31,12 +31,12 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS !!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. const blob = await response.blob(); const size = import.meta.scriptElement.dataset.size || 300; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~~~~~~~~ !!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'. @@ -50,48 +50,48 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS ==== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts (5 errors) ==== export let x = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. export let y = import.metal; ~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~ !!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? export let z = import.import.import.malkovich; ~~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~ !!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? ==== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts (5 errors) ==== let globalA = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. let globalB = import.metal; ~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~ !!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? let globalC = import.import.import.malkovich; ~~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~ !!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? ==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (8 errors) ==== export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'. ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~ !!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'. ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. import.meta = foo; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. @@ -104,4 +104,4 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS const { a, b, c } = import.meta.wellKnownProperty; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. \ No newline at end of file +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. \ No newline at end of file diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols b/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).errors.txt b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).errors.txt index 9c82043ec74..2f65f3fc12c 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).errors.txt +++ b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).errors.txt @@ -1,25 +1,25 @@ error TS2468: Cannot find global value 'Promise'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'. -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,22): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? -tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? @@ -31,12 +31,12 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS !!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. const blob = await response.blob(); const size = import.meta.scriptElement.dataset.size || 300; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~~~~~~~~ !!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'. @@ -50,48 +50,48 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS ==== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts (5 errors) ==== export let x = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. export let y = import.metal; ~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~ !!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? export let z = import.import.import.malkovich; ~~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~ !!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? ==== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts (5 errors) ==== let globalA = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. let globalB = import.metal; ~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~ !!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? let globalC = import.import.import.malkovich; ~~~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~ !!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'? ==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (8 errors) ==== export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~ !!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'. ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~ !!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'. ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. import.meta = foo; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. ~~~~~~~~~~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. @@ -104,4 +104,4 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS const { a, b, c } = import.meta.wellKnownProperty; ~~~~~~~~~~~ -!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'. \ No newline at end of file +!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. \ No newline at end of file diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=es2020,target=es5).symbols b/tests/baselines/reference/importMeta(module=es2020,target=es5).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=es2020,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=es2020,target=es5).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=es2020,target=esnext).symbols b/tests/baselines/reference/importMeta(module=es2020,target=esnext).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=es2020,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=es2020,target=esnext).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols b/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=esnext,target=es5).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols b/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=esnext,target=esnext).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=system,target=es5).symbols b/tests/baselines/reference/importMeta(module=system,target=es5).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=system,target=es5).symbols +++ b/tests/baselines/reference/importMeta(module=system,target=es5).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMeta(module=system,target=esnext).symbols b/tests/baselines/reference/importMeta(module=system,target=esnext).symbols index d012bf0903c..334c5c3c327 100644 --- a/tests/baselines/reference/importMeta(module=system,target=esnext).symbols +++ b/tests/baselines/reference/importMeta(module=system,target=esnext).symbols @@ -8,6 +8,7 @@ >URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --)) @@ -20,6 +21,7 @@ const size = import.meta.scriptElement.dataset.size || 300; >size : Symbol(size, Decl(example.ts, 5, 7)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) const image = new Image(); >image : Symbol(image, Decl(example.ts, 7, 7)) @@ -57,6 +59,7 @@ export let x = import.meta; >x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) export let y = import.metal; >y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10)) @@ -68,6 +71,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; >globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) let globalB = import.metal; >globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3)) @@ -80,11 +84,15 @@ export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) import.meta = foo; >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12)) // @Filename augmentations.ts @@ -108,5 +116,6 @@ const { a, b, c } = import.meta.wellKnownProperty; >c : Symbol(c, Decl(assignmentTargets.ts, 10, 13)) >import.meta.wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16)) +>meta : Symbol(ImportMetaExpression.meta) >wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24)) diff --git a/tests/baselines/reference/importMetaNarrowing(module=es2020).symbols b/tests/baselines/reference/importMetaNarrowing(module=es2020).symbols index f2c77663a50..4d932447a7c 100644 --- a/tests/baselines/reference/importMetaNarrowing(module=es2020).symbols +++ b/tests/baselines/reference/importMetaNarrowing(module=es2020).symbols @@ -7,11 +7,13 @@ declare global { interface ImportMeta {foo?: () => void} }; if (import.meta.foo) { >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/tests/baselines/reference/importMetaNarrowing(module=esnext).symbols b/tests/baselines/reference/importMetaNarrowing(module=esnext).symbols index f2c77663a50..4d932447a7c 100644 --- a/tests/baselines/reference/importMetaNarrowing(module=esnext).symbols +++ b/tests/baselines/reference/importMetaNarrowing(module=esnext).symbols @@ -7,11 +7,13 @@ declare global { interface ImportMeta {foo?: () => void} }; if (import.meta.foo) { >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/tests/baselines/reference/importMetaNarrowing(module=system).symbols b/tests/baselines/reference/importMetaNarrowing(module=system).symbols index f2c77663a50..4d932447a7c 100644 --- a/tests/baselines/reference/importMetaNarrowing(module=system).symbols +++ b/tests/baselines/reference/importMetaNarrowing(module=system).symbols @@ -7,11 +7,13 @@ declare global { interface ImportMeta {foo?: () => void} }; if (import.meta.foo) { >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); >import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) +>meta : Symbol(ImportMetaExpression.meta) >foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/tests/baselines/reference/importWithTypeArguments.errors.txt b/tests/baselines/reference/importWithTypeArguments.errors.txt new file mode 100644 index 00000000000..2981a63bec7 --- /dev/null +++ b/tests/baselines/reference/importWithTypeArguments.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/types/import/importWithTypeArguments.ts(1,1): error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. +tests/cases/conformance/types/import/importWithTypeArguments.ts(2,11): error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. + + +==== tests/cases/conformance/types/import/importWithTypeArguments.ts (2 errors) ==== + import + ~~~~~~~~~ +!!! error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. + const a = import + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1326: This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments. + \ No newline at end of file diff --git a/tests/baselines/reference/importWithTypeArguments.js b/tests/baselines/reference/importWithTypeArguments.js new file mode 100644 index 00000000000..9a54a823050 --- /dev/null +++ b/tests/baselines/reference/importWithTypeArguments.js @@ -0,0 +1,8 @@ +//// [importWithTypeArguments.ts] +import +const a = import + + +//// [importWithTypeArguments.js] +import; +var a = (import); diff --git a/tests/baselines/reference/importWithTypeArguments.symbols b/tests/baselines/reference/importWithTypeArguments.symbols new file mode 100644 index 00000000000..5f769bb1978 --- /dev/null +++ b/tests/baselines/reference/importWithTypeArguments.symbols @@ -0,0 +1,7 @@ +=== tests/cases/conformance/types/import/importWithTypeArguments.ts === +import +>T : Symbol(T) + +const a = import +>a : Symbol(a, Decl(importWithTypeArguments.ts, 1, 5)) + diff --git a/tests/baselines/reference/importWithTypeArguments.types b/tests/baselines/reference/importWithTypeArguments.types new file mode 100644 index 00000000000..442b3cc9ed9 --- /dev/null +++ b/tests/baselines/reference/importWithTypeArguments.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/types/import/importWithTypeArguments.ts === +import +const a = import +>a : any + diff --git a/tests/baselines/reference/jsdocLink3.baseline b/tests/baselines/reference/jsdocLink3.baseline index da1a6fa0cfb..039d48a13af 100644 --- a/tests/baselines/reference/jsdocLink3.baseline +++ b/tests/baselines/reference/jsdocLink3.baseline @@ -59,10 +59,10 @@ "text": "C", "kind": "linkName", "target": { - "fileName": "/jsdocLink3.ts", + "fileName": "/module1.ts", "textSpan": { - "start": 0, - "length": 18 + "start": 9, + "length": 1 } } }, @@ -87,10 +87,10 @@ "text": "C", "kind": "linkName", "target": { - "fileName": "/jsdocLink3.ts", + "fileName": "/module1.ts", "textSpan": { - "start": 0, - "length": 18 + "start": 9, + "length": 1 } } }, @@ -110,10 +110,10 @@ "text": "C()", "kind": "linkName", "target": { - "fileName": "/jsdocLink3.ts", + "fileName": "/module1.ts", "textSpan": { - "start": 0, - "length": 18 + "start": 9, + "length": 1 } } }, @@ -133,10 +133,10 @@ "text": "C", "kind": "linkName", "target": { - "fileName": "/jsdocLink3.ts", + "fileName": "/module1.ts", "textSpan": { - "start": 0, - "length": 18 + "start": 9, + "length": 1 } } }, @@ -181,10 +181,10 @@ "text": "C", "kind": "linkName", "target": { - "fileName": "/jsdocLink3.ts", + "fileName": "/module1.ts", "textSpan": { - "start": 0, - "length": 18 + "start": 9, + "length": 1 } } }, diff --git a/tests/baselines/reference/jsxExcessPropsAndAssignability.errors.txt b/tests/baselines/reference/jsxExcessPropsAndAssignability.errors.txt index d2acf848242..3e15a705edf 100644 --- a/tests/baselines/reference/jsxExcessPropsAndAssignability.errors.txt +++ b/tests/baselines/reference/jsxExcessPropsAndAssignability.errors.txt @@ -1,8 +1,10 @@ +tests/cases/compiler/jsxExcessPropsAndAssignability.tsx(14,27): error TS2698: Spread types may only be created from object types. tests/cases/compiler/jsxExcessPropsAndAssignability.tsx(16,6): error TS2322: Type 'ComposedComponentProps & { myProp: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<{ children?: ReactNode; }> & Readonly'. Type 'ComposedComponentProps & { myProp: number; }' is not assignable to type 'Readonly'. +tests/cases/compiler/jsxExcessPropsAndAssignability.tsx(16,27): error TS2698: Spread types may only be created from object types. -==== tests/cases/compiler/jsxExcessPropsAndAssignability.tsx (1 errors) ==== +==== tests/cases/compiler/jsxExcessPropsAndAssignability.tsx (3 errors) ==== /// import * as React from 'react'; @@ -17,10 +19,14 @@ tests/cases/compiler/jsxExcessPropsAndAssignability.tsx(16,6): error TS2322: Typ // Expected no error, got none - good ; + ~~~~~ +!!! error TS2698: Spread types may only be created from object types. // Expected error, but got none - bad! ; ~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'ComposedComponentProps & { myProp: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<{ children?: ReactNode; }> & Readonly'. !!! error TS2322: Type 'ComposedComponentProps & { myProp: number; }' is not assignable to type 'Readonly'. + ~~~~~ +!!! error TS2698: Spread types may only be created from object types. }; \ No newline at end of file diff --git a/tests/baselines/reference/jsxNamespacePrefixInName.errors.txt b/tests/baselines/reference/jsxNamespacePrefixInName.errors.txt index 2eb3df02ad1..a983e8736b0 100644 --- a/tests/baselines/reference/jsxNamespacePrefixInName.errors.txt +++ b/tests/baselines/reference/jsxNamespacePrefixInName.errors.txt @@ -19,6 +19,7 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(21,21): error TS1003: Identifi tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,26): error TS1003: Identifier expected. tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,27): error TS1003: Identifier expected. tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,29): error TS1005: '...' expected. +tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,29): error TS2698: Spread types may only be created from object types. tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,21): error TS1109: Expression expected. tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,22): error TS1109: Expression expected. tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,25): error TS1005: ',' expected. @@ -29,7 +30,7 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,42): error TS1109: Expressi tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,24): error TS1003: Identifier expected. -==== tests/cases/compiler/jsxNamespacePrefixInName.tsx (29 errors) ==== +==== tests/cases/compiler/jsxNamespacePrefixInName.tsx (30 errors) ==== var justElement1 = ; var justElement2 = ; var justElement3 = ; @@ -94,6 +95,8 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,24): error TS1003: Identifi !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS1005: '...' expected. + ~~~~~~~ +!!! error TS2698: Spread types may only be created from object types. var beginOfIdent1 = <:a attr={"value"} />; ~ diff --git a/tests/baselines/reference/jsxNamespacePrefixInNameReact.errors.txt b/tests/baselines/reference/jsxNamespacePrefixInNameReact.errors.txt index 890fc67fc26..bae65da057a 100644 --- a/tests/baselines/reference/jsxNamespacePrefixInNameReact.errors.txt +++ b/tests/baselines/reference/jsxNamespacePrefixInNameReact.errors.txt @@ -19,6 +19,7 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(23,21): error TS1003: Ide tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,26): error TS1003: Identifier expected. tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,27): error TS1003: Identifier expected. tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,29): error TS1005: '...' expected. +tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,29): error TS2698: Spread types may only be created from object types. tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,21): error TS1109: Expression expected. tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,22): error TS1109: Expression expected. tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,25): error TS1005: ',' expected. @@ -29,7 +30,7 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,42): error TS1109: Exp tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,24): error TS1003: Identifier expected. -==== tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx (29 errors) ==== +==== tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx (30 errors) ==== declare var React: any; var justElement1 = ; @@ -96,6 +97,8 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,24): error TS1003: Ide !!! error TS1003: Identifier expected. ~~~~~~~ !!! error TS1005: '...' expected. + ~~~~~~~ +!!! error TS2698: Spread types may only be created from object types. var beginOfIdent1 = <:a attr={"value"} />; ~ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.errors.txt b/tests/baselines/reference/keyofAndIndexedAccess.errors.txt deleted file mode 100644 index f5c436bbf1d..00000000000 --- a/tests/baselines/reference/keyofAndIndexedAccess.errors.txt +++ /dev/null @@ -1,709 +0,0 @@ -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(316,5): error TS2322: Type 'T' is not assignable to type '{}'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(317,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. - Type 'T[string]' is not assignable to type '{}'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(318,5): error TS2322: Type 'T[K]' is not assignable to type '{}'. - Type 'T[keyof T]' is not assignable to type '{}'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(323,5): error TS2322: Type 'T' is not assignable to type '{} | null | undefined'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(324,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. - Type 'T[string]' is not assignable to type '{} | null | undefined'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(325,5): error TS2322: Type 'T[K]' is not assignable to type '{} | null | undefined'. - Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(611,33): error TS2345: Argument of type 'T[K]' is not assignable to parameter of type '{} | null | undefined'. - Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. - Type 'T[string]' is not assignable to type '{} | null | undefined'. -tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(619,13): error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. - Type 'T[string]' is not assignable to type '{} | null | undefined'. - - -==== tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts (8 errors) ==== - class Shape { - name: string; - width: number; - height: number; - visible: boolean; - } - - class TaggedShape extends Shape { - tag: string; - } - - class Item { - name: string; - price: number; - } - - class Options { - visible: "yes" | "no"; - } - - type Dictionary = { [x: string]: T }; - type NumericallyIndexed = { [x: number]: T }; - - const enum E { A, B, C } - - type K00 = keyof any; // string - type K01 = keyof string; // "toString" | "charAt" | ... - type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... - type K03 = keyof boolean; // "valueOf" - type K04 = keyof void; // never - type K05 = keyof undefined; // never - type K06 = keyof null; // never - type K07 = keyof never; // string | number | symbol - type K08 = keyof unknown; // never - - type K10 = keyof Shape; // "name" | "width" | "height" | "visible" - type K11 = keyof Shape[]; // "length" | "toString" | ... - type K12 = keyof Dictionary; // string - type K13 = keyof {}; // never - type K14 = keyof Object; // "constructor" | "toString" | ... - type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... - type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... - type K17 = keyof (Shape | Item); // "name" - type K18 = keyof (Shape & Item); // "name" | "width" | "height" | "visible" | "price" - type K19 = keyof NumericallyIndexed // never - - type KeyOf = keyof T; - - type K20 = KeyOf; // "name" | "width" | "height" | "visible" - type K21 = KeyOf>; // string - - type NAME = "name"; - type WIDTH_OR_HEIGHT = "width" | "height"; - - type Q10 = Shape["name"]; // string - type Q11 = Shape["width" | "height"]; // number - type Q12 = Shape["name" | "visible"]; // string | boolean - - type Q20 = Shape[NAME]; // string - type Q21 = Shape[WIDTH_OR_HEIGHT]; // number - - type Q30 = [string, number][0]; // string - type Q31 = [string, number][1]; // number - type Q32 = [string, number][number]; // string | number - type Q33 = [string, number][E.A]; // string - type Q34 = [string, number][E.B]; // number - type Q35 = [string, number]["0"]; // string - type Q36 = [string, number]["1"]; // string - - type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" - type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" - - type Q50 = Dictionary["howdy"]; // Shape - type Q51 = Dictionary[123]; // Shape - type Q52 = Dictionary[E.B]; // Shape - - declare let cond: boolean; - - function getProperty(obj: T, key: K) { - return obj[key]; - } - - function setProperty(obj: T, key: K, value: T[K]) { - obj[key] = value; - } - - function f10(shape: Shape) { - let name = getProperty(shape, "name"); // string - let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number - let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean - setProperty(shape, "name", "rectangle"); - setProperty(shape, cond ? "width" : "height", 10); - setProperty(shape, cond ? "name" : "visible", true); // Technically not safe - } - - function f11(a: Shape[]) { - let len = getProperty(a, "length"); // number - setProperty(a, "length", len); - } - - function f12(t: [Shape, boolean]) { - let len = getProperty(t, "length"); - let s2 = getProperty(t, "0"); // Shape - let b2 = getProperty(t, "1"); // boolean - } - - function f13(foo: any, bar: any) { - let x = getProperty(foo, "x"); // any - let y = getProperty(foo, "100"); // any - let z = getProperty(foo, bar); // any - } - - class Component { - props: PropType; - getProperty(key: K) { - return this.props[key]; - } - setProperty(key: K, value: PropType[K]) { - this.props[key] = value; - } - } - - function f20(component: Component) { - let name = component.getProperty("name"); // string - let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number - let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean - component.setProperty("name", "rectangle"); - component.setProperty(cond ? "width" : "height", 10) - component.setProperty(cond ? "name" : "visible", true); // Technically not safe - } - - function pluck(array: T[], key: K) { - return array.map(x => x[key]); - } - - function f30(shapes: Shape[]) { - let names = pluck(shapes, "name"); // string[] - let widths = pluck(shapes, "width"); // number[] - let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] - } - - function f31(key: K) { - const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; - return shape[key]; // Shape[K] - } - - function f32(key: K) { - const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; - return shape[key]; // Shape[K] - } - - function f33(shape: S, key: K) { - let name = getProperty(shape, "name"); - let prop = getProperty(shape, key); - return prop; - } - - function f34(ts: TaggedShape) { - let tag1 = f33(ts, "tag"); - let tag2 = getProperty(ts, "tag"); - } - - class C { - public x: string; - protected y: string; - private z: string; - } - - // Indexed access expressions have always permitted access to private and protected members. - // For consistency we also permit such access in indexed access types. - function f40(c: C) { - type X = C["x"]; - type Y = C["y"]; - type Z = C["z"]; - let x: X = c["x"]; - let y: Y = c["y"]; - let z: Z = c["z"]; - } - - function f50(k: keyof T, s: string) { - const x1 = s as keyof T; - const x2 = k as string; - } - - function f51(k: K, s: string) { - const x1 = s as keyof T; - const x2 = k as string; - } - - function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number) { - const x1 = obj[s]; - const x2 = obj[n]; - const x3 = obj[k]; - } - - function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number) { - const x1 = obj[s]; - const x2 = obj[n]; - const x3 = obj[k]; - } - - function f54(obj: T, key: keyof T) { - for (let s in obj[key]) { - } - const b = "foo" in obj[key]; - } - - function f55(obj: T, key: K) { - for (let s in obj[key]) { - } - const b = "foo" in obj[key]; - } - - function f60(source: T, target: T) { - for (let k in source) { - target[k] = source[k]; - } - } - - function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void) { - func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); - func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); - func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); - } - - function f71(func: (x: T, y: U) => Partial) { - let x = func({ a: 1, b: "hello" }, { c: true }); - x.a; // number | undefined - x.b; // string | undefined - x.c; // boolean | undefined - } - - function f72(func: (x: T, y: U, k: K) => (T & U)[K]) { - let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number - let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string - let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean - } - - function f73(func: (x: T, y: U, k: K) => (T & U)[K]) { - let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number - let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string - let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean - } - - function f74(func: (x: T, y: U, k: K) => (T | U)[K]) { - let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number - let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean - } - - function f80(obj: T) { - let a1 = obj.a; // { x: any } - let a2 = obj['a']; // { x: any } - let a3 = obj['a'] as T['a']; // T["a"] - let x1 = obj.a.x; // any - let x2 = obj['a']['x']; // any - let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] - } - - function f81(obj: T) { - return obj['a']['x'] as T['a']['x']; - } - - function f82() { - let x1 = f81({ a: { x: "hello" } }); // string - let x2 = f81({ a: { x: 42 } }); // number - } - - function f83(obj: T, key: K) { - return obj[key]['x'] as T[K]['x']; - } - - function f84() { - let x1 = f83({ foo: { x: "hello" } }, "foo"); // string - let x2 = f83({ bar: { x: 42 } }, "bar"); // number - } - - class C1 { - x: number; - get(key: K) { - return this[key]; - } - set(key: K, value: this[K]) { - this[key] = value; - } - foo() { - let x1 = this.x; // number - let x2 = this["x"]; // number - let x3 = this.get("x"); // this["x"] - let x4 = getProperty(this, "x"); // this["x"] - this.x = 42; - this["x"] = 42; - this.set("x", 42); - setProperty(this, "x", 42); - } - } - - type S2 = { - a: string; - b: string; - }; - - function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { - x1 = x2; - x1 = x3; - x2 = x1; - x2 = x3; - x3 = x1; - x3 = x2; - x1.length; - x2.length; - x3.length; - } - - function f91(x: T, y: T[keyof T], z: T[K]) { - let a: {}; - a = x; - ~ -!!! error TS2322: Type 'T' is not assignable to type '{}'. -!!! related TS2208 tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts:314:14: This type parameter probably needs an `extends object` constraint. - a = y; - ~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[string]' is not assignable to type '{}'. - a = z; - ~ -!!! error TS2322: Type 'T[K]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. - } - - function f92(x: T, y: T[keyof T], z: T[K]) { - let a: {} | null | undefined; - a = x; - ~ -!!! error TS2322: Type 'T' is not assignable to type '{} | null | undefined'. -!!! related TS2208 tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts:321:14: This type parameter probably needs an `extends object` constraint. - a = y; - ~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type '{} | null | undefined'. - a = z; - ~ -!!! error TS2322: Type 'T[K]' is not assignable to type '{} | null | undefined'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. - } - - // Repros from #12011 - - class Base { - get(prop: K) { - return this[prop]; - } - set(prop: K, value: this[K]) { - this[prop] = value; - } - } - - class Person extends Base { - parts: number; - constructor(parts: number) { - super(); - this.set("parts", parts); - } - getParts() { - return this.get("parts") - } - } - - class OtherPerson { - parts: number; - constructor(parts: number) { - setProperty(this, "parts", parts); - } - getParts() { - return getProperty(this, "parts") - } - } - - // Modified repro from #12544 - - function path(obj: T, key1: K1): T[K1]; - function path(obj: T, key1: K1, key2: K2): T[K1][K2]; - function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; - function path(obj: any, ...keys: (string | number)[]): any; - function path(obj: any, ...keys: (string | number)[]): any { - let result = obj; - for (let k of keys) { - result = result[k]; - } - return result; - } - - type Thing = { - a: { x: number, y: string }, - b: boolean - }; - - - function f1(thing: Thing) { - let x1 = path(thing, 'a'); // { x: number, y: string } - let x2 = path(thing, 'a', 'y'); // string - let x3 = path(thing, 'b'); // boolean - let x4 = path(thing, ...['a', 'x']); // any - } - - // Repro from comment in #12114 - - const assignTo2 = (object: T, key1: K1, key2: K2) => - (value: T[K1][K2]) => object[key1][key2] = value; - - // Modified repro from #12573 - - declare function one(handler: (t: T) => void): T - var empty = one(() => {}) // inferred as {}, expected - - type Handlers = { [K in keyof T]: (t: T[K]) => void } - declare function on(handlerHash: Handlers): T - var hashOfEmpty1 = on({ test: () => {} }); // {} - var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } - - // Repro from #12624 - - interface Options1 { - data?: Data - computed?: Computed; - } - - declare class Component1 { - constructor(options: Options1); - get(key: K): (Data & Computed)[K]; - } - - let c1 = new Component1({ - data: { - hello: "" - } - }); - - c1.get("hello"); - - // Repro from #12625 - - interface Options2 { - data?: Data - computed?: Computed; - } - - declare class Component2 { - constructor(options: Options2); - get(key: K): (Data & Computed)[K]; - } - - // Repro from #12641 - - interface R { - p: number; - } - - function f(p: K) { - let a: any; - a[p].add; // any - } - - // Repro from #12651 - - type MethodDescriptor = { - name: string; - args: any[]; - returnValue: any; - } - - declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; - - type SomeMethodDescriptor = { - name: "someMethod"; - args: [string, number]; - returnValue: string[]; - } - - let result = dispatchMethod("someMethod", ["hello", 35]); - - // Repro from #13073 - - type KeyTypes = "a" | "b" - let MyThingy: { [key in KeyTypes]: string[] }; - - function addToMyThingy(key: S) { - MyThingy[key].push("a"); - } - - // Repro from #13102 - - type Handler = { - onChange: (name: keyof T) => void; - }; - - function onChangeGenericFunction(handler: Handler) { - handler.onChange('preset') - } - - // Repro from #13285 - - function updateIds, K extends string>( - obj: T, - idFields: K[], - idMapping: Partial> - ): Record { - for (const idField of idFields) { - const newId: T[K] | undefined = idMapping[obj[idField]]; - if (newId) { - obj[idField] = newId; - } - } - return obj; - } - - // Repro from #13285 - - function updateIds2( - obj: T, - key: K, - stringMap: { [oldId: string]: string } - ) { - var x = obj[key]; - stringMap[x]; // Should be OK. - } - - // Repro from #13514 - - declare function head>(list: T): T[0]; - - // Repro from #13604 - - class A { - props: T & { foo: string }; - } - - class B extends A<{ x: number}> { - f(p: this["props"]) { - p.x; - } - } - - // Repro from #13749 - - class Form { - private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} - - public set(prop: K, value: T[K]) { - this.childFormFactories[prop](value) - } - } - - // Repro from #13787 - - class SampleClass

{ - public props: Readonly

; - constructor(props: P) { - this.props = Object.freeze(props); - } - } - - interface Foo { - foo: string; - } - - declare function merge(obj1: T, obj2: U): T & U; - - class AnotherSampleClass extends SampleClass { - constructor(props: T) { - const foo: Foo = { foo: "bar" }; - super(merge(props, foo)); - } - - public brokenMethod() { - this.props.foo.concat; - } - } - new AnotherSampleClass({}); - - // Positive repro from #17166 - function f3>(t: T, k: K, tk: T[K]): void { - for (let key in t) { - key = k // ok, K ==> keyof T - t[key] = tk; // ok, T[K] ==> T[keyof T] - } - } - - // # 21185 - type Predicates = { - [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] - } - - // Repros from #23592 - - type Example = { [K in keyof T]: T[K]["prop"] }; - type Result = Example<{ a: { prop: string }; b: { prop: number } }>; - - type Helper2 = { [K in keyof T]: Extract }; - type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; - type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; - - // Repro from #23618 - - type DBBoolTable = { [k in K]: 0 | 1 } - enum Flag { - FLAG_1 = "flag_1", - FLAG_2 = "flag_2" - } - - type SimpleDBRecord = { staticField: number } & DBBoolTable - function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]) { - return record[flags[0]]; - } - - type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable - function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]) { - return record[flags[0]]; - } - - // Repro from #21368 - - interface I { - foo: string; - } - - declare function take(p: T): void; - - function fn(o: T, k: K) { - take<{} | null | undefined>(o[k]); - ~~~~ -!!! error TS2345: Argument of type 'T[K]' is not assignable to parameter of type '{} | null | undefined'. -!!! error TS2345: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. -!!! error TS2345: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. -!!! error TS2345: Type 'T[string]' is not assignable to type '{} | null | undefined'. - take(o[k]); - } - - // Repro from #23133 - - class Unbounded { - foo(x: T[keyof T]) { - let y: {} | undefined | null = x; - ~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type '{} | null | undefined'. - } - } - - // Repro from #23940 - - interface I7 { - x: any; - } - type Foo7 = T; - declare function f7(type: K): Foo7; - - // Repro from #21770 - - type Dict = { [key in T]: number }; - type DictDict = { [key in V]: Dict }; - - function ff1(dd: DictDict, k1: V, k2: T): number { - return dd[k1][k2]; - } - - function ff2(dd: DictDict, k1: V, k2: T): number { - const d: Dict = dd[k1]; - return d[k2]; - } - - // Repro from #26409 - - const cf1 = (t: T, k: K) => - { - const s: string = t[k]; - t.cool; - }; - - const cf2 = (t: T, k: K) => - { - const s: string = t[k]; - t.cool; - }; - \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeConstraints2.errors.txt b/tests/baselines/reference/mappedTypeConstraints2.errors.txt index 5dcfca6d63f..7950e9d0f54 100644 --- a/tests/baselines/reference/mappedTypeConstraints2.errors.txt +++ b/tests/baselines/reference/mappedTypeConstraints2.errors.txt @@ -41,4 +41,26 @@ tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts(25,57): error TS2 ~~~~~~~~~~~~~~ !!! error TS2322: Type 'Foo[`get${T}`]' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${T}`]'. + + // Repro from #48626 + + interface Bounds { + min: number; + max: number; + } + + type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; + } + + function validate(obj: T, bounds: NumericBoundsOf) { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key as keyof NumericBoundsOf]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) return false; + } + } + return true; + } \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeConstraints2.js b/tests/baselines/reference/mappedTypeConstraints2.js index 4c583b32495..3237f1d8b81 100644 --- a/tests/baselines/reference/mappedTypeConstraints2.js +++ b/tests/baselines/reference/mappedTypeConstraints2.js @@ -24,20 +24,53 @@ type Foo = { }; const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type 'Foo[`get${T}`]' is not assignable to type 'T' + +// Repro from #48626 + +interface Bounds { + min: number; + max: number; +} + +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +} + +function validate(obj: T, bounds: NumericBoundsOf) { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key as keyof NumericBoundsOf]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) return false; + } + } + return true; +} //// [mappedTypeConstraints2.js] "use strict"; function f1(obj, key) { - var x = obj[key]; + const x = obj[key]; } function f2(obj, key) { - var x = obj[key]; // Error + const x = obj[key]; // Error } function f3(obj, key) { - var x = obj[key]; // Error + const x = obj[key]; // Error +} +const get = (t, foo) => foo[`get${t}`]; // Type 'Foo[`get${T}`]' is not assignable to type 'T' +function validate(obj, bounds) { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) + return false; + } + } + return true; } -var get = function (t, foo) { return foo["get".concat(t)]; }; // Type 'Foo[`get${T}`]' is not assignable to type 'T' //// [mappedTypeConstraints2.d.ts] @@ -63,3 +96,11 @@ declare type Foo = { [RemappedT in T as `get${RemappedT}`]: RemappedT; }; declare const get: (t: T, foo: Foo) => T; +interface Bounds { + min: number; + max: number; +} +declare type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +}; +declare function validate(obj: T, bounds: NumericBoundsOf): boolean; diff --git a/tests/baselines/reference/mappedTypeConstraints2.symbols b/tests/baselines/reference/mappedTypeConstraints2.symbols index 9e1727cae64..90ee329dada 100644 --- a/tests/baselines/reference/mappedTypeConstraints2.symbols +++ b/tests/baselines/reference/mappedTypeConstraints2.symbols @@ -104,3 +104,70 @@ const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type >foo : Symbol(foo, Decl(mappedTypeConstraints2.ts, 24, 36)) >t : Symbol(t, Decl(mappedTypeConstraints2.ts, 24, 31)) +// Repro from #48626 + +interface Bounds { +>Bounds : Symbol(Bounds, Decl(mappedTypeConstraints2.ts, 24, 71)) + + min: number; +>min : Symbol(Bounds.min, Decl(mappedTypeConstraints2.ts, 28, 18)) + + max: number; +>max : Symbol(Bounds.max, Decl(mappedTypeConstraints2.ts, 29, 16)) +} + +type NumericBoundsOf = { +>NumericBoundsOf : Symbol(NumericBoundsOf, Decl(mappedTypeConstraints2.ts, 31, 1)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 33, 21)) + + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +>K : Symbol(K, Decl(mappedTypeConstraints2.ts, 34, 5)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 33, 21)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 33, 21)) +>K : Symbol(K, Decl(mappedTypeConstraints2.ts, 34, 5)) +>K : Symbol(K, Decl(mappedTypeConstraints2.ts, 34, 5)) +>Bounds : Symbol(Bounds, Decl(mappedTypeConstraints2.ts, 24, 71)) +} + +function validate(obj: T, bounds: NumericBoundsOf) { +>validate : Symbol(validate, Decl(mappedTypeConstraints2.ts, 35, 1)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 37, 18)) +>obj : Symbol(obj, Decl(mappedTypeConstraints2.ts, 37, 36)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 37, 18)) +>bounds : Symbol(bounds, Decl(mappedTypeConstraints2.ts, 37, 43)) +>NumericBoundsOf : Symbol(NumericBoundsOf, Decl(mappedTypeConstraints2.ts, 31, 1)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 37, 18)) + + for (const [key, val] of Object.entries(obj)) { +>key : Symbol(key, Decl(mappedTypeConstraints2.ts, 38, 16)) +>val : Symbol(val, Decl(mappedTypeConstraints2.ts, 38, 20)) +>Object.entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>obj : Symbol(obj, Decl(mappedTypeConstraints2.ts, 37, 36)) + + const boundsForKey = bounds[key as keyof NumericBoundsOf]; +>boundsForKey : Symbol(boundsForKey, Decl(mappedTypeConstraints2.ts, 39, 13)) +>bounds : Symbol(bounds, Decl(mappedTypeConstraints2.ts, 37, 43)) +>key : Symbol(key, Decl(mappedTypeConstraints2.ts, 38, 16)) +>NumericBoundsOf : Symbol(NumericBoundsOf, Decl(mappedTypeConstraints2.ts, 31, 1)) +>T : Symbol(T, Decl(mappedTypeConstraints2.ts, 37, 18)) + + if (boundsForKey) { +>boundsForKey : Symbol(boundsForKey, Decl(mappedTypeConstraints2.ts, 39, 13)) + + const { min, max } = boundsForKey; +>min : Symbol(min, Decl(mappedTypeConstraints2.ts, 41, 19)) +>max : Symbol(max, Decl(mappedTypeConstraints2.ts, 41, 24)) +>boundsForKey : Symbol(boundsForKey, Decl(mappedTypeConstraints2.ts, 39, 13)) + + if (min > val || max < val) return false; +>min : Symbol(min, Decl(mappedTypeConstraints2.ts, 41, 19)) +>val : Symbol(val, Decl(mappedTypeConstraints2.ts, 38, 20)) +>max : Symbol(max, Decl(mappedTypeConstraints2.ts, 41, 24)) +>val : Symbol(val, Decl(mappedTypeConstraints2.ts, 38, 20)) + } + } + return true; +} + diff --git a/tests/baselines/reference/mappedTypeConstraints2.types b/tests/baselines/reference/mappedTypeConstraints2.types index e1967ee3453..534e02c8518 100644 --- a/tests/baselines/reference/mappedTypeConstraints2.types +++ b/tests/baselines/reference/mappedTypeConstraints2.types @@ -68,3 +68,63 @@ const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type >`get${t}` : `get${T}` >t : T +// Repro from #48626 + +interface Bounds { + min: number; +>min : number + + max: number; +>max : number +} + +type NumericBoundsOf = { +>NumericBoundsOf : NumericBoundsOf + + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +} + +function validate(obj: T, bounds: NumericBoundsOf) { +>validate : (obj: T, bounds: NumericBoundsOf) => boolean +>obj : T +>bounds : NumericBoundsOf + + for (const [key, val] of Object.entries(obj)) { +>key : string +>val : any +>Object.entries(obj) : [string, any][] +>Object.entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>Object : ObjectConstructor +>entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>obj : T + + const boundsForKey = bounds[key as keyof NumericBoundsOf]; +>boundsForKey : NumericBoundsOf[keyof NumericBoundsOf] +>bounds[key as keyof NumericBoundsOf] : NumericBoundsOf[keyof NumericBoundsOf] +>bounds : NumericBoundsOf +>key as keyof NumericBoundsOf : keyof NumericBoundsOf +>key : string + + if (boundsForKey) { +>boundsForKey : NumericBoundsOf[keyof NumericBoundsOf] + + const { min, max } = boundsForKey; +>min : number +>max : number +>boundsForKey : NumericBoundsOf[keyof NumericBoundsOf] + + if (min > val || max < val) return false; +>min > val || max < val : boolean +>min > val : boolean +>min : number +>val : any +>max < val : boolean +>max : number +>val : any +>false : false + } + } + return true; +>true : true +} + diff --git a/tests/baselines/reference/mappedTypesAndObjects.errors.txt b/tests/baselines/reference/mappedTypesAndObjects.errors.txt deleted file mode 100644 index c32fc58b370..00000000000 --- a/tests/baselines/reference/mappedTypesAndObjects.errors.txt +++ /dev/null @@ -1,54 +0,0 @@ -tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts(25,11): error TS2430: Interface 'E1' incorrectly extends interface 'Base'. - Types of property 'foo' are incompatible. - Type 'T' is not assignable to type '{ [key: string]: any; }'. - - -==== tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts (1 errors) ==== - function f1(x: Partial, y: Readonly) { - let obj: {}; - obj = x; - obj = y; - } - - function f2(x: Partial, y: Readonly) { - let obj: { [x: string]: any }; - obj = x; - obj = y; - } - - function f3(x: Partial) { - x = {}; - } - - // Repro from #12900 - - interface Base { - foo: { [key: string]: any }; - bar: any; - baz: any; - } - - interface E1 extends Base { - ~~ -!!! error TS2430: Interface 'E1' incorrectly extends interface 'Base'. -!!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type '{ [key: string]: any; }'. -!!! related TS2208 tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts:25:14: This type parameter probably needs an `extends object` constraint. - foo: T; - } - - interface Something { name: string, value: string }; - interface E2 extends Base { - foo: Partial; // or other mapped type - } - - interface E3 extends Base { - foo: Partial; // or other mapped type - } - - // Repro from #13747 - - class Form { - private values: {[P in keyof T]?: T[P]} = {} - } - \ No newline at end of file diff --git a/tests/baselines/reference/misspelledNewMetaProperty.symbols b/tests/baselines/reference/misspelledNewMetaProperty.symbols index 55ab6fe7a67..d14d7eadeff 100644 --- a/tests/baselines/reference/misspelledNewMetaProperty.symbols +++ b/tests/baselines/reference/misspelledNewMetaProperty.symbols @@ -2,5 +2,4 @@ function foo(){new.targ} >foo : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0)) >new.targ : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0)) ->targ : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).js b/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).js rename to tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).js diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).symbols b/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).symbols rename to tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).symbols diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).types b/tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node12).types rename to tests/baselines/reference/moduleResolutionWithModule(module=commonjs,moduleresolution=node16).types diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).errors.txt b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).errors.txt similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).errors.txt rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).errors.txt diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).js b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).js rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).js diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).symbols b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).symbols rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).symbols diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).types b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).types rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node).types diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).js b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).js rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).js diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).symbols b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).symbols rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).symbols diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).types b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node12).types rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=node16).types diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).js b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).js rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).js diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).symbols b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).symbols rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).symbols diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).types b/tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=nodenext).types rename to tests/baselines/reference/moduleResolutionWithModule(module=node16,moduleresolution=nodenext).types diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).js b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).js rename to tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).js diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).symbols b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).symbols similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).symbols rename to tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).symbols diff --git a/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).types b/tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).types similarity index 100% rename from tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node12).types rename to tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node16).types diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension1.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension1.errors.txt index 5f3cbbc121c..30a2033c2b1 100644 --- a/tests/baselines/reference/moduleResolutionWithoutExtension1.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithoutExtension1.errors.txt @@ -1,5 +1,5 @@ -/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.mjs'? -/src/bar.mts(3,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.mjs'? +/src/bar.mts(3,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. ==== /src/foo.mts (0 errors) ==== @@ -11,8 +11,8 @@ // Extensionless relative path ES import in an ES module import { foo } from "./foo"; // should error, suggest adding ".mjs" ~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.mjs'? import { baz } from "./baz"; // should error, ask for extension, no extension suggestion ~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt index 0c753a10299..356bbda92dd 100644 --- a/tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt @@ -1,4 +1,4 @@ -/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.jsx'? +/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'? ==== /src/foo.tsx (0 errors) ==== @@ -10,5 +10,5 @@ // Extensionless relative path ES import in an ES module import { foo } from "./foo"; // should error, suggest adding ".jsx" ~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.jsx'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'? \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt index afd24269d69..917ae242e7a 100644 --- a/tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt @@ -1,4 +1,4 @@ -/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.js'? +/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'? ==== /src/foo.tsx (0 errors) ==== @@ -10,5 +10,5 @@ // Extensionless relative path ES import in an ES module import { foo } from "./foo"; // should error, suggest adding ".js" ~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.js'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'? \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension5.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension5.errors.txt index b4b0a89ae97..2660f052ec9 100644 --- a/tests/baselines/reference/moduleResolutionWithoutExtension5.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithoutExtension5.errors.txt @@ -1,8 +1,8 @@ -/src/buzz.mts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +/src/buzz.mts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. ==== /src/buzz.mts (1 errors) ==== // Extensionless relative path dynamic import in an ES module import("./foo").then(x => x); // should error, ask for extension ~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithoutExtension8.errors.txt b/tests/baselines/reference/moduleResolutionWithoutExtension8.errors.txt index c990522c6c7..b857c4d7fbc 100644 --- a/tests/baselines/reference/moduleResolutionWithoutExtension8.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithoutExtension8.errors.txt @@ -1,8 +1,8 @@ -/src/bar.cts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +/src/bar.cts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. ==== /src/bar.cts (1 errors) ==== // Extensionless relative path dynamic import in a cjs module import("./foo").then(x => x); // should error, ask for extension ~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file diff --git a/tests/baselines/reference/newLineInTypeofInstantiation.js b/tests/baselines/reference/newLineInTypeofInstantiation.js new file mode 100644 index 00000000000..b43b6770305 --- /dev/null +++ b/tests/baselines/reference/newLineInTypeofInstantiation.js @@ -0,0 +1,9 @@ +//// [newLineInTypeofInstantiation.ts] +interface Example { + (a: number): typeof a + + (): void +} + + +//// [newLineInTypeofInstantiation.js] diff --git a/tests/baselines/reference/newLineInTypeofInstantiation.symbols b/tests/baselines/reference/newLineInTypeofInstantiation.symbols new file mode 100644 index 00000000000..2a3ccf8097e --- /dev/null +++ b/tests/baselines/reference/newLineInTypeofInstantiation.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/newLineInTypeofInstantiation.ts === +interface Example { +>Example : Symbol(Example, Decl(newLineInTypeofInstantiation.ts, 0, 0)) + + (a: number): typeof a +>a : Symbol(a, Decl(newLineInTypeofInstantiation.ts, 1, 5)) +>a : Symbol(a, Decl(newLineInTypeofInstantiation.ts, 1, 5)) + + (): void +>T : Symbol(T, Decl(newLineInTypeofInstantiation.ts, 3, 5)) +} + diff --git a/tests/baselines/reference/newLineInTypeofInstantiation.types b/tests/baselines/reference/newLineInTypeofInstantiation.types new file mode 100644 index 00000000000..a57d7df124b --- /dev/null +++ b/tests/baselines/reference/newLineInTypeofInstantiation.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/newLineInTypeofInstantiation.ts === +interface Example { + (a: number): typeof a +>a : number +>a : number + + (): void +} + diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).errors.txt b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).errors.txt similarity index 70% rename from tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).errors.txt rename to tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).errors.txt index bdf6aba250c..42a324dadf6 100644 --- a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).errors.txt +++ b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).errors.txt @@ -1,6 +1,8 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as self from "package"; diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).js b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).js rename to tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).js diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).symbols b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).symbols rename to tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).symbols diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).types b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).types rename to tests/baselines/reference/nodeAllowJsPackageSelfName(module=node16).types diff --git a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt index bdf6aba250c..42a324dadf6 100644 --- a/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeAllowJsPackageSelfName(module=nodenext).errors.txt @@ -1,6 +1,8 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as self from "package"; diff --git a/tests/baselines/reference/nodeModules1(module=node12).errors.txt b/tests/baselines/reference/nodeModules1(module=node16).errors.txt similarity index 85% rename from tests/baselines/reference/nodeModules1(module=node12).errors.txt rename to tests/baselines/reference/nodeModules1(module=node16).errors.txt index 724e3b73ed7..e8bcd1c06a7 100644 --- a/tests/baselines/reference/nodeModules1(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModules1(module=node16).errors.txt @@ -15,70 +15,70 @@ tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.cts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.cts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.cts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.cts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.cts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.cts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.mts(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.mts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.mts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.mts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.mts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.mts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.mts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.mts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.mts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.mts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.mts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.mts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.mts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.mts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.ts(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.ts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.ts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.ts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.ts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.ts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.ts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.ts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.ts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.ts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.ts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.ts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.ts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.ts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? ==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ==== @@ -136,34 +136,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -228,34 +228,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; @@ -372,34 +372,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // cjs format file const x = 1; export {x}; @@ -422,34 +422,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -514,34 +514,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; export {x}; diff --git a/tests/baselines/reference/nodeModules1(module=node12).js b/tests/baselines/reference/nodeModules1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModules1(module=node12).js rename to tests/baselines/reference/nodeModules1(module=node16).js diff --git a/tests/baselines/reference/nodeModules1(module=node12).symbols b/tests/baselines/reference/nodeModules1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModules1(module=node12).symbols rename to tests/baselines/reference/nodeModules1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModules1(module=node12).types b/tests/baselines/reference/nodeModules1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModules1(module=node12).types rename to tests/baselines/reference/nodeModules1(module=node16).types diff --git a/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt index 724e3b73ed7..e8bcd1c06a7 100644 --- a/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModules1(module=nodenext).errors.txt @@ -15,70 +15,70 @@ tests/cases/conformance/node/index.cts(59,22): error TS1471: Module './subfolder tests/cases/conformance/node/index.cts(60,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.cts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.cts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.cts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.cts(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.cts(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.cts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.cts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.cts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.cts(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.mts(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.mts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.mts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.mts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.mts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.mts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.mts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.mts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.mts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.mts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.mts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.mts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.mts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.mts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.mts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.mts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.mts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.mts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.mts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.ts(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.ts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.ts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.ts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.ts(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.ts(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.ts(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.ts(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/index.ts(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(51,22): error TS1471: Module './index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(58,22): error TS1471: Module './subfolder2/another' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(59,22): error TS1471: Module './subfolder2/another/' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.ts(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/index.ts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/index.ts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/index.ts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/index.ts(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/index.ts(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/index.ts(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/index.ts(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? ==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ==== @@ -136,34 +136,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -228,34 +228,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; @@ -372,34 +372,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // cjs format file const x = 1; export {x}; @@ -422,34 +422,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -514,34 +514,34 @@ tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import path !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; export {x}; diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).errors.txt similarity index 87% rename from tests/baselines/reference/nodeModulesAllowJs1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJs1(module=node16).errors.txt index 178c28ed460..83c4abe3350 100644 --- a/tests/baselines/reference/nodeModulesAllowJs1(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).errors.txt @@ -26,27 +26,27 @@ tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './s tests/cases/conformance/node/allowJs/index.cjs(61,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.js(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.js(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.js(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.js(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.js(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -64,27 +64,27 @@ tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './su tests/cases/conformance/node/allowJs/index.js(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.js(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.js(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.js(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.mjs(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.mjs(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.mjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -102,16 +102,16 @@ tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './s tests/cases/conformance/node/allowJs/index.mjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.mjs(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? ==== tests/cases/conformance/node/allowJs/subfolder/index.js (0 errors) ==== @@ -169,34 +169,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -283,34 +283,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; export {x}; @@ -448,34 +448,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // cjs format file const x = 1; export {x}; @@ -498,34 +498,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -612,34 +612,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=node12).js b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJs1(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJs1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJs1(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJs1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=node12).types b/tests/baselines/reference/nodeModulesAllowJs1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJs1(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJs1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt index 178c28ed460..83c4abe3350 100644 --- a/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJs1(module=nodenext).errors.txt @@ -26,27 +26,27 @@ tests/cases/conformance/node/allowJs/index.cjs(60,22): error TS1471: Module './s tests/cases/conformance/node/allowJs/index.cjs(61,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.cjs(61,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(75,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.cjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.cjs(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(76,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(78,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(79,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(81,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(82,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.cjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(84,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.cjs(85,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.js(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.js(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.js(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.js(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.js(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.js(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -64,27 +64,27 @@ tests/cases/conformance/node/allowJs/index.js(59,22): error TS1471: Module './su tests/cases/conformance/node/allowJs/index.js(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.js(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.js(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.js(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.js(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.js(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.js(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.js(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.js(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.mjs(14,22): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(15,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(16,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(17,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(18,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(19,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(20,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(21,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(22,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(23,22): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(24,22): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? tests/cases/conformance/node/allowJs/index.mjs(50,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.mjs(50,22): error TS1471: Module './' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.mjs(51,1): error TS8002: 'import ... =' can only be used in TypeScript files. @@ -102,16 +102,16 @@ tests/cases/conformance/node/allowJs/index.mjs(59,22): error TS1471: Module './s tests/cases/conformance/node/allowJs/index.mjs(60,1): error TS8002: 'import ... =' can only be used in TypeScript files. tests/cases/conformance/node/allowJs/index.mjs(60,22): error TS1471: Module './subfolder2/another/index' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.mjs(74,21): error TS2307: Cannot find module './' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? -tests/cases/conformance/node/allowJs/index.mjs(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(75,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(76,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(77,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(78,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(79,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(80,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(81,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +tests/cases/conformance/node/allowJs/index.mjs(82,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(83,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? ==== tests/cases/conformance/node/allowJs/subfolder/index.js (0 errors) ==== @@ -169,34 +169,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -283,34 +283,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; export {x}; @@ -448,34 +448,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // cjs format file const x = 1; export {x}; @@ -498,34 +498,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. import * as m14 from "./index"; ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? import * as m15 from "./subfolder"; ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m16 from "./subfolder/"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m17 from "./subfolder/index"; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? import * as m18 from "./subfolder2"; ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m19 from "./subfolder2/"; ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m20 from "./subfolder2/index"; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? import * as m21 from "./subfolder2/another"; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m22 from "./subfolder2/another/"; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import * as m23 from "./subfolder2/another/index"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? void m1; void m2; void m3; @@ -612,34 +612,34 @@ tests/cases/conformance/node/allowJs/index.mjs(84,21): error TS2835: Relative im !!! error TS2307: Cannot find module './' or its corresponding type declarations. const _m36 = import("./index"); ~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './index.mjs'? const _m37 = import("./subfolder"); ~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m38 = import("./subfolder/"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m39 = import("./subfolder/index"); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder/index.mjs'? const _m40 = import("./subfolder2"); ~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m41 = import("./subfolder2/"); ~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m42 = import("./subfolder2/index"); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/index.mjs'? const _m43 = import("./subfolder2/another"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m44 = import("./subfolder2/another/"); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. const _m45 = import("./subfolder2/another/index"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? +!!! error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'? // esm format file const x = 1; diff --git a/tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsCjsFromJs(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).errors.txt similarity index 90% rename from tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).errors.txt index 83e50c001e7..904a4714318 100644 --- a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).errors.txt @@ -1,9 +1,11 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt index 83e50c001e7..904a4714318 100644 --- a/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsConditionalPackageExports(module=nodenext).errors.txt @@ -1,9 +1,11 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsDynamicImport(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).errors.txt similarity index 96% rename from tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).errors.txt index 84386984bc3..ed3dc20285b 100644 --- a/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(2,10): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. tests/cases/conformance/node/allowJs/subfolder/index.js(3,7): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. -tests/cases/conformance/node/allowJs/subfolder/index.js(4,7): error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node12. +tests/cases/conformance/node/allowJs/subfolder/index.js(4,7): error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node16. tests/cases/conformance/node/allowJs/subfolder/index.js(5,14): error TS1216: Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules. @@ -14,7 +14,7 @@ tests/cases/conformance/node/allowJs/subfolder/index.js(5,14): error TS1216: Ide !!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. class Object {} ~~~~~~ -!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node12. +!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node16. export const __esModule = false; ~~~~~~~~~~ !!! error TS1216: Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules. diff --git a/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsGeneratedNameCollisions(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsImportAssignment(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions2(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsImportHelpersCollisions3(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).symbols similarity index 88% rename from tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).symbols index 02586281af4..89649ba7b33 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).symbols +++ b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).symbols @@ -4,6 +4,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.js, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; @@ -15,6 +16,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.js, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; diff --git a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsImportMeta(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=nodenext).symbols b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=nodenext).symbols index 02586281af4..89649ba7b33 100644 --- a/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=nodenext).symbols +++ b/tests/baselines/reference/nodeModulesAllowJsImportMeta(module=nodenext).symbols @@ -4,6 +4,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.js, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; @@ -15,6 +16,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.js, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).errors.txt similarity index 90% rename from tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).errors.txt index e6f4b3ce2eb..63e7af6ada0 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -6,6 +7,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt index e6f4b3ce2eb..63e7af6ada0 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageExports(module=nodenext).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -6,6 +7,7 @@ tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).errors.txt similarity index 80% rename from tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).errors.txt index 261be58f1a2..ffbcbe24e99 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).errors.txt @@ -1,7 +1,9 @@ +error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "#cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsPackageImports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt index 261be58f1a2..ffbcbe24e99 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsPackageImports(module=nodenext).errors.txt @@ -1,7 +1,9 @@ +error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/allowJs/index.cjs(3,22): error TS1471: Module '#mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/allowJs/index.cjs(4,23): error TS1471: Module '#type' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2210: The project root is ambiguous, but is required to resolve import map entry '.' in file 'tests/cases/conformance/node/allowJs/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file import * as cjs from "#cjs"; diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).errors.txt deleted file mode 100644 index 2036308bb9b..00000000000 --- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).errors.txt +++ /dev/null @@ -1,120 +0,0 @@ -tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.cjs(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.js(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/index.mjs(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - - -==== tests/cases/conformance/node/allowJs/index.js (3 errors) ==== - // esm format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/allowJs/index.mjs (3 errors) ==== - // esm format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/allowJs/index.cjs (3 errors) ==== - // cjs format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts (3 errors) ==== - // cjs format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts (3 errors) ==== - // esm format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts (3 errors) ==== - // cjs format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/allowJs/package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module", - } -==== tests/cases/conformance/node/allowJs/node_modules/inner/package.json (0 errors) ==== - { - "name": "inner", - "private": true, - "exports": { - "./cjs/*.cjs": "./*.cjs", - "./mjs/*.mjs": "./*.mjs", - "./js/*.js": "./*.js" - } - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).errors.txt b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).errors.txt new file mode 100644 index 00000000000..b989016f16a --- /dev/null +++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).errors.txt @@ -0,0 +1,78 @@ +tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + + +==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== + // esm format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/allowJs/index.mjs (0 errors) ==== + // esm format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/allowJs/index.cjs (1 errors) ==== + // cjs format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts (2 errors) ==== + // cjs format file + import * as cjs from "inner/cjs/index.cjs"; + ~~~ +!!! error TS2303: Circular definition of import alias 'cjs'. + import * as mjs from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts (0 errors) ==== + // esm format file + import * as cjs from "inner/cjs/index.cjs"; + import * as mjs from "inner/mjs/index.mjs"; + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts (1 errors) ==== + // cjs format file + import * as cjs from "inner/cjs/index.cjs"; + import * as mjs from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/allowJs/package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + } +==== tests/cases/conformance/node/allowJs/node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "exports": { + "./cjs/*.cjs": "./*.cjs", + "./mjs/*.mjs": "./*.mjs", + "./js/*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).symbols similarity index 81% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).symbols index 870a2298dea..2e24aeb1a83 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).symbols +++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).symbols @@ -70,13 +70,13 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.ts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.ts, 4, 8)) +>cjs : Symbol(mjs.cjs.cjs.type.cjs, Decl(index.d.ts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.ts, 5, 8)) +>mjs : Symbol(mjs.cjs.cjs.type.mjs, Decl(index.d.ts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.ts, 6, 8)) +>type : Symbol(mjs.cjs.cjs.type.type, Decl(index.d.ts, 6, 8)) === tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts === // esm format file @@ -90,13 +90,13 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.mts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.mts, 4, 8)) +>cjs : Symbol(cjs.cjs.mjs.cjs, Decl(index.d.mts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.mts, 5, 8)) +>mjs : Symbol(cjs.cjs.mjs.mjs, Decl(index.d.mts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.mts, 6, 8)) +>type : Symbol(cjs.cjs.mjs.type, Decl(index.d.mts, 6, 8)) === tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts === // cjs format file @@ -110,11 +110,11 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.cts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.cts, 4, 8)) +>cjs : Symbol(cjs.cjs, Decl(index.d.cts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.cts, 5, 8)) +>mjs : Symbol(cjs.mjs, Decl(index.d.cts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.cts, 6, 8)) +>type : Symbol(cjs.type, Decl(index.d.cts, 6, 8)) diff --git a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).types similarity index 62% rename from tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).types index c35a6bdbf60..556b7c15a3d 100644 --- a/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node12).types +++ b/tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsTrailers(module=node16).types @@ -1,62 +1,62 @@ === tests/cases/conformance/node/allowJs/index.js === // esm format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof typei cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs typei; ->typei : any +>typei : typeof typei === tests/cases/conformance/node/allowJs/index.mjs === // esm format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof typei cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs typei; ->typei : any +>typei : typeof typei === tests/cases/conformance/node/allowJs/index.cjs === // cjs format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof cjsi.mjs.cjs.type cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.mjs typei; ->typei : any +>typei : typeof cjsi.mjs.cjs.type === tests/cases/conformance/node/allowJs/node_modules/inner/index.d.ts === // cjs format file @@ -64,57 +64,57 @@ import * as cjs from "inner/cjs/index.cjs"; >cjs : any import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof mjs.cjs.cjs.type export { cjs }; >cjs : any export { mjs }; ->mjs : any +>mjs : typeof mjs export { type }; ->type : any +>type : typeof mjs.cjs.cjs.type === tests/cases/conformance/node/allowJs/node_modules/inner/index.d.mts === // esm format file import * as cjs from "inner/cjs/index.cjs"; ->cjs : any +>cjs : typeof cjs import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof cjs.cjs.mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof cjs.cjs.mjs.type export { cjs }; ->cjs : any +>cjs : typeof cjs export { mjs }; ->mjs : any +>mjs : typeof cjs.cjs.mjs export { type }; ->type : any +>type : typeof cjs.cjs.mjs.type === tests/cases/conformance/node/allowJs/node_modules/inner/index.d.cts === // cjs format file import * as cjs from "inner/cjs/index.cjs"; ->cjs : any +>cjs : typeof cjs import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof cjs.mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof cjs.mjs.cjs.type export { cjs }; ->cjs : any +>cjs : typeof cjs export { mjs }; ->mjs : any +>mjs : typeof cjs.mjs export { type }; ->type : any +>type : typeof cjs.mjs.cjs.type diff --git a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsSynchronousCallErrors(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).errors.txt b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).errors.txt deleted file mode 100644 index b7096bfd56e..00000000000 --- a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -tests/cases/conformance/node/allowJs/index.js(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/allowJs/index.js(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/allowJs/subfolder/index.js(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/allowJs/subfolder/index.js(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - - -==== tests/cases/conformance/node/allowJs/subfolder/index.js (2 errors) ==== - // cjs format file - const x = await 1; - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - export {x}; - for await (const y of []) {} - ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/allowJs/index.js (2 errors) ==== - // esm format file - const x = await 1; - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - export {x}; - for await (const y of []) {} - ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/allowJs/package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module" - } -==== tests/cases/conformance/node/allowJs/subfolder/package.json (0 errors) ==== - { - "type": "commonjs" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).errors.txt b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).errors.txt new file mode 100644 index 00000000000..00d2aa600be --- /dev/null +++ b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).errors.txt @@ -0,0 +1,28 @@ +tests/cases/conformance/node/allowJs/subfolder/index.js(2,11): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +tests/cases/conformance/node/allowJs/subfolder/index.js(4,5): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. + + +==== tests/cases/conformance/node/allowJs/subfolder/index.js (2 errors) ==== + // cjs format file + const x = await 1; + ~~~~~ +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. + export {x}; + for await (const y of []) {} + ~~~~~ +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== + // esm format file + const x = await 1; + export {x}; + for await (const y of []) {} +==== tests/cases/conformance/node/allowJs/package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== tests/cases/conformance/node/allowJs/subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).js b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).js rename to tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).js diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).symbols b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).symbols rename to tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).types b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node12).types rename to tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=node16).types diff --git a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=nodenext).errors.txt index 50ff19655e9..00d2aa600be 100644 --- a/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsTopLevelAwait(module=nodenext).errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/node/allowJs/subfolder/index.js(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/allowJs/subfolder/index.js(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/node/allowJs/subfolder/index.js(2,11): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +tests/cases/conformance/node/allowJs/subfolder/index.js(4,5): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. ==== tests/cases/conformance/node/allowJs/subfolder/index.js (2 errors) ==== // cjs format file const x = await 1; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. export {x}; for await (const y of []) {} ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. ==== tests/cases/conformance/node/allowJs/index.js (0 errors) ==== // esm format file const x = await 1; diff --git a/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).js b/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).js rename to tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).js diff --git a/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).symbols b/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).symbols rename to tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).types b/tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node12).types rename to tests/baselines/reference/nodeModulesCjsFormatFileAlwaysHasDefault(module=node16).types diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).errors.txt similarity index 90% rename from tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).errors.txt index 7397e1e1dbd..793f3f03da2 100644 --- a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).errors.txt @@ -1,9 +1,11 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesConditionalPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesConditionalPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt index 7397e1e1dbd..793f3f03da2 100644 --- a/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesConditionalPackageExports(module=nodenext).errors.txt @@ -1,9 +1,11 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'. tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).errors.txt similarity index 91% rename from tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).errors.txt index 11f39b9dd93..4ee7f3c4cef 100644 --- a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -8,6 +9,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in ambient contexts. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt index 11f39b9dd93..4ee7f3c4cef 100644 --- a/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesDeclarationEmitWithPackageExports(module=nodenext).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -8,6 +9,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: tests/cases/conformance/node/node_modules/inner/index.d.ts(5,1): error TS1036: Statements are not allowed in ambient contexts. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesDynamicImport(module=node12).js b/tests/baselines/reference/nodeModulesDynamicImport(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesDynamicImport(module=node12).js rename to tests/baselines/reference/nodeModulesDynamicImport(module=node16).js diff --git a/tests/baselines/reference/nodeModulesDynamicImport(module=node12).symbols b/tests/baselines/reference/nodeModulesDynamicImport(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesDynamicImport(module=node12).symbols rename to tests/baselines/reference/nodeModulesDynamicImport(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesDynamicImport(module=node12).types b/tests/baselines/reference/nodeModulesDynamicImport(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesDynamicImport(module=node12).types rename to tests/baselines/reference/nodeModulesDynamicImport(module=node16).types diff --git a/tests/baselines/reference/nodeModulesExportAssignments(module=node12).errors.txt b/tests/baselines/reference/nodeModulesExportAssignments(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesExportAssignments(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesExportAssignments(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesExportAssignments(module=node12).js b/tests/baselines/reference/nodeModulesExportAssignments(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesExportAssignments(module=node12).js rename to tests/baselines/reference/nodeModulesExportAssignments(module=node16).js diff --git a/tests/baselines/reference/nodeModulesExportAssignments(module=node12).symbols b/tests/baselines/reference/nodeModulesExportAssignments(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesExportAssignments(module=node12).symbols rename to tests/baselines/reference/nodeModulesExportAssignments(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesExportAssignments(module=node12).types b/tests/baselines/reference/nodeModulesExportAssignments(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesExportAssignments(module=node12).types rename to tests/baselines/reference/nodeModulesExportAssignments(module=node16).types diff --git a/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).errors.txt b/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).errors.txt similarity index 72% rename from tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).errors.txt index d6b74fdf7e0..53ab414e38b 100644 --- a/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).errors.txt @@ -1,9 +1,8 @@ tests/cases/conformance/node/index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. tests/cases/conformance/node/index.ts(3,14): error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. -tests/cases/conformance/node/index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/index.ts (3 errors) ==== +==== tests/cases/conformance/node/index.ts (2 errors) ==== // esm format file import { Thing } from "inner/other"; ~~~~~~~~~~~~~ @@ -11,8 +10,6 @@ tests/cases/conformance/node/index.ts(3,19): error TS1378: Top-level 'await' exp export const a = (await import("inner")).x(); ~ !!! error TS2742: The inferred type of 'a' cannot be named without a reference to './node_modules/inner/other.js'. This is likely not portable. A type annotation is necessary. - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ==== // esm format file export { x } from "./other.js"; diff --git a/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).js b/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).js rename to tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).js diff --git a/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).symbols b/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).symbols rename to tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).types b/tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node12).types rename to tests/baselines/reference/nodeModulesExportsBlocksSpecifierResolution(module=node16).types diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).errors.txt b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).errors.txt similarity index 68% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).errors.txt index 1a9b16d74f2..b25fc090f8b 100644 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).errors.txt @@ -1,15 +1,12 @@ tests/cases/conformance/node/index.ts(2,23): error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/index.ts (2 errors) ==== +==== tests/cases/conformance/node/index.ts (1 errors) ==== // esm format file import { Thing } from "inner/other.js"; // should fail ~~~~~~~~~~~~~~~~ !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. export const a = (await import("inner")).x(); - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ==== // esm format file export { x } from "./other.js"; diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).js b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).js rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).js diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).symbols b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).symbols rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).types b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node12).types rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationConditions(module=node16).types diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).errors.txt b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).errors.txt similarity index 66% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).errors.txt index 7216f0655b9..b2d874ee38b 100644 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).errors.txt @@ -1,15 +1,12 @@ tests/cases/conformance/node/index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/index.ts (2 errors) ==== +==== tests/cases/conformance/node/index.ts (1 errors) ==== // esm format file import { Thing } from "inner/other"; ~~~~~~~~~~~~~ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ==== // esm format file export { x } from "./other.js"; diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).js b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).js rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).js diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).symbols b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).symbols rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).types b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node12).types rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationDirectory(module=node16).types diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).types b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).types deleted file mode 100644 index 4ac4b8a432f..00000000000 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).types +++ /dev/null @@ -1,26 +0,0 @@ -=== tests/cases/conformance/node/index.ts === -// esm format file -import { Thing } from "inner/other"; ->Thing : any - -export const a = (await import("inner/index.js")).x(); ->a : any ->(await import("inner/index.js")).x() : any ->(await import("inner/index.js")).x : any ->(await import("inner/index.js")) : any ->await import("inner/index.js") : any ->import("inner/index.js") : Promise ->"inner/index.js" : "inner/index.js" ->x : any - -=== tests/cases/conformance/node/node_modules/inner/index.d.ts === -// esm format file -export { x } from "./other.js"; ->x : () => import("tests/cases/conformance/node/node_modules/inner/other").Thing - -=== tests/cases/conformance/node/node_modules/inner/other.d.ts === -// esm format file -export interface Thing {} -export const x: () => Thing; ->x : () => Thing - diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).errors.txt b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).errors.txt similarity index 56% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).errors.txt index 9db51390624..c315a2a5232 100644 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).errors.txt @@ -1,18 +1,12 @@ tests/cases/conformance/node/index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/index.ts(3,32): error TS2307: Cannot find module 'inner/index.js' or its corresponding type declarations. -==== tests/cases/conformance/node/index.ts (3 errors) ==== +==== tests/cases/conformance/node/index.ts (1 errors) ==== // esm format file import { Thing } from "inner/other"; ~~~~~~~~~~~~~ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/index.js' or its corresponding type declarations. ==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ==== // esm format file export { x } from "./other.js"; diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).js b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).js similarity index 90% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).js rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).js index 63cf2dae874..dcdd62bed69 100644 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).js +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).js @@ -33,4 +33,4 @@ export const a = (await import("inner/index.js")).x(); //// [index.d.ts] -export declare const a: any; +export declare const a: import("inner/other.js").Thing; diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).symbols b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).symbols similarity index 73% rename from tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).symbols rename to tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).symbols index 5bcb54a5bdb..a12a7b1c026 100644 --- a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node12).symbols +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).symbols @@ -5,6 +5,9 @@ import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); >a : Symbol(a, Decl(index.ts, 2, 12)) +>(await import("inner/index.js")).x : Symbol(x, Decl(index.d.ts, 1, 8)) +>"inner/index.js" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.ts, 0, 0)) +>x : Symbol(x, Decl(index.d.ts, 1, 8)) === tests/cases/conformance/node/node_modules/inner/index.d.ts === // esm format file diff --git a/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).types b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).types new file mode 100644 index 00000000000..a75c2359eb0 --- /dev/null +++ b/tests/baselines/reference/nodeModulesExportsSpecifierGenerationPattern(module=node16).types @@ -0,0 +1,26 @@ +=== tests/cases/conformance/node/index.ts === +// esm format file +import { Thing } from "inner/other"; +>Thing : any + +export const a = (await import("inner/index.js")).x(); +>a : import("tests/cases/conformance/node/node_modules/inner/other").Thing +>(await import("inner/index.js")).x() : import("tests/cases/conformance/node/node_modules/inner/other").Thing +>(await import("inner/index.js")).x : () => import("tests/cases/conformance/node/node_modules/inner/other").Thing +>(await import("inner/index.js")) : typeof import("tests/cases/conformance/node/node_modules/inner/index") +>await import("inner/index.js") : typeof import("tests/cases/conformance/node/node_modules/inner/index") +>import("inner/index.js") : Promise +>"inner/index.js" : "inner/index.js" +>x : () => import("tests/cases/conformance/node/node_modules/inner/other").Thing + +=== tests/cases/conformance/node/node_modules/inner/index.d.ts === +// esm format file +export { x } from "./other.js"; +>x : () => import("tests/cases/conformance/node/node_modules/inner/other").Thing + +=== tests/cases/conformance/node/node_modules/inner/other.d.ts === +// esm format file +export interface Thing {} +export const x: () => Thing; +>x : () => Thing + diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).errors.txt b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).js b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).js rename to tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).js diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).symbols b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).symbols rename to tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).types b/tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesForbidenSyntax(module=node12).types rename to tests/baselines/reference/nodeModulesForbidenSyntax(module=node16).types diff --git a/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).errors.txt b/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).errors.txt similarity index 96% rename from tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).errors.txt index bcf0d1d592c..e268184c7ff 100644 --- a/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/node/subfolder/index.ts(2,10): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module. tests/cases/conformance/node/subfolder/index.ts(3,7): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. -tests/cases/conformance/node/subfolder/index.ts(4,7): error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node12. +tests/cases/conformance/node/subfolder/index.ts(4,7): error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node16. tests/cases/conformance/node/subfolder/index.ts(5,14): error TS1216: Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules. @@ -14,7 +14,7 @@ tests/cases/conformance/node/subfolder/index.ts(5,14): error TS1216: Identifier !!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. class Object {} ~~~~~~ -!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node12. +!!! error TS2725: Class name cannot be 'Object' when targeting ES5 with module Node16. export const __esModule = false; ~~~~~~~~~~ !!! error TS1216: Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules. diff --git a/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).js b/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).js rename to tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).js diff --git a/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).symbols b/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).symbols rename to tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).types b/tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node12).types rename to tests/baselines/reference/nodeModulesGeneratedNameCollisions(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportAssertions(module=node16).errors.txt similarity index 65% rename from tests/baselines/reference/nodeModulesImportAssertions(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportAssertions(module=node16).errors.txt index e1c723d1dec..5730914f867 100644 --- a/tests/baselines/reference/nodeModulesImportAssertions(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesImportAssertions(module=node16).errors.txt @@ -1,25 +1,19 @@ -tests/cases/conformance/node/index.ts(1,18): error TS7062: JSON imports are experimental in ES module mode imports. tests/cases/conformance/node/index.ts(1,35): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. tests/cases/conformance/node/otherc.cts(1,35): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. -tests/cases/conformance/node/otherc.cts(2,22): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/otherc.cts(2,40): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +tests/cases/conformance/node/otherc.cts(2,40): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. -==== tests/cases/conformance/node/index.ts (2 errors) ==== +==== tests/cases/conformance/node/index.ts (1 errors) ==== import json from "./package.json" assert { type: "json" }; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. -==== tests/cases/conformance/node/otherc.cts (3 errors) ==== +==== tests/cases/conformance/node/otherc.cts (2 errors) ==== import json from "./package.json" assert { type: "json" }; // should error, cjs mode imports don't support assertions ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. const json2 = import("./package.json", { assert: { type: "json" } }); // should be fine - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'. +!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. ==== tests/cases/conformance/node/package.json (0 errors) ==== { "name": "pkg", diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=node12).js b/tests/baselines/reference/nodeModulesImportAssertions(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssertions(module=node12).js rename to tests/baselines/reference/nodeModulesImportAssertions(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=node12).symbols b/tests/baselines/reference/nodeModulesImportAssertions(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssertions(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportAssertions(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=node12).types b/tests/baselines/reference/nodeModulesImportAssertions(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssertions(module=node12).types rename to tests/baselines/reference/nodeModulesImportAssertions(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt index 29dbcb839f5..1a3369a277e 100644 --- a/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesImportAssertions(module=nodenext).errors.txt @@ -1,19 +1,13 @@ -tests/cases/conformance/node/index.ts(1,18): error TS7062: JSON imports are experimental in ES module mode imports. tests/cases/conformance/node/otherc.cts(1,35): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls. -tests/cases/conformance/node/otherc.cts(2,22): error TS7062: JSON imports are experimental in ES module mode imports. -==== tests/cases/conformance/node/index.ts (1 errors) ==== +==== tests/cases/conformance/node/index.ts (0 errors) ==== import json from "./package.json" assert { type: "json" }; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. -==== tests/cases/conformance/node/otherc.cts (2 errors) ==== +==== tests/cases/conformance/node/otherc.cts (1 errors) ==== import json from "./package.json" assert { type: "json" }; // should error, cjs mode imports don't support assertions ~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls. const json2 = import("./package.json", { assert: { type: "json" } }); // should be fine - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. ==== tests/cases/conformance/node/package.json (0 errors) ==== { "name": "pkg", diff --git a/tests/baselines/reference/nodeModulesImportAssignments(module=node12).js b/tests/baselines/reference/nodeModulesImportAssignments(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssignments(module=node12).js rename to tests/baselines/reference/nodeModulesImportAssignments(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportAssignments(module=node12).symbols b/tests/baselines/reference/nodeModulesImportAssignments(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssignments(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportAssignments(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportAssignments(module=node12).types b/tests/baselines/reference/nodeModulesImportAssignments(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportAssignments(module=node12).types rename to tests/baselines/reference/nodeModulesImportAssignments(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).js b/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).js rename to tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).symbols b/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).types b/tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node12).types rename to tests/baselines/reference/nodeModulesImportHelpersCollisions(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).js b/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).js rename to tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).symbols b/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).types b/tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node12).types rename to tests/baselines/reference/nodeModulesImportHelpersCollisions2(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).js b/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).js rename to tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).symbols b/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).types b/tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node12).types rename to tests/baselines/reference/nodeModulesImportHelpersCollisions3(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportMeta(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportMeta(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportMeta(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportMeta(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportMeta(module=node12).js b/tests/baselines/reference/nodeModulesImportMeta(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportMeta(module=node12).js rename to tests/baselines/reference/nodeModulesImportMeta(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportMeta(module=node12).symbols b/tests/baselines/reference/nodeModulesImportMeta(module=node16).symbols similarity index 88% rename from tests/baselines/reference/nodeModulesImportMeta(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportMeta(module=node16).symbols index 311b12e19ce..4a9cda0f125 100644 --- a/tests/baselines/reference/nodeModulesImportMeta(module=node12).symbols +++ b/tests/baselines/reference/nodeModulesImportMeta(module=node16).symbols @@ -4,6 +4,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.ts, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; @@ -15,6 +16,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.ts, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; diff --git a/tests/baselines/reference/nodeModulesImportMeta(module=node12).types b/tests/baselines/reference/nodeModulesImportMeta(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportMeta(module=node12).types rename to tests/baselines/reference/nodeModulesImportMeta(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportMeta(module=nodenext).symbols b/tests/baselines/reference/nodeModulesImportMeta(module=nodenext).symbols index 311b12e19ce..4a9cda0f125 100644 --- a/tests/baselines/reference/nodeModulesImportMeta(module=nodenext).symbols +++ b/tests/baselines/reference/nodeModulesImportMeta(module=nodenext).symbols @@ -4,6 +4,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.ts, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; @@ -15,6 +16,7 @@ const x = import.meta.url; >x : Symbol(x, Decl(index.ts, 1, 5)) >import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(ImportMetaExpression.meta) >url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --)) export {x}; diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).js b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).js rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).symbols b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).types b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node12).types rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).js b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).js rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).symbols b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).types b/tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node12).types rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).js b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).js rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).symbols b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).types b/tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node12).types rename to tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).js b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).js rename to tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).symbols b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).types b/tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node12).types rename to tests/baselines/reference/nodeModulesImportResolutionIntoExport(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).js b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).js rename to tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).symbols b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).types b/tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node12).types rename to tests/baselines/reference/nodeModulesImportResolutionNoCycle(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).js b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).js rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).symbols b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).types b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node12).types rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmit1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).js b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).js rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).symbols b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).symbols rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).types b/tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node12).types rename to tests/baselines/reference/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesPackageExports(module=node16).errors.txt similarity index 90% rename from tests/baselines/reference/nodeModulesPackageExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesPackageExports(module=node16).errors.txt index 464db33f319..8f7452ffa72 100644 --- a/tests/baselines/reference/nodeModulesPackageExports(module=node12).errors.txt +++ b/tests/baselines/reference/nodeModulesPackageExports(module=node16).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -6,6 +7,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt index 464db33f319..8f7452ffa72 100644 --- a/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesPackageExports(module=nodenext).errors.txt @@ -1,3 +1,4 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. tests/cases/conformance/node/index.cts(3,22): error TS1471: Module 'package/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(4,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. tests/cases/conformance/node/index.cts(9,23): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. @@ -6,6 +7,7 @@ tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/conformance/node/package.json'. Supply the `rootDir` compiler option to disambiguate. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file import * as cjs from "package/cjs"; diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesPackageImports(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesPackageImports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesPackageImports(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node12).js b/tests/baselines/reference/nodeModulesPackageImports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesPackageImports(module=node12).js rename to tests/baselines/reference/nodeModulesPackageImports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node12).symbols b/tests/baselines/reference/nodeModulesPackageImports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesPackageImports(module=node12).symbols rename to tests/baselines/reference/nodeModulesPackageImports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node12).types b/tests/baselines/reference/nodeModulesPackageImports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesPackageImports(module=node12).types rename to tests/baselines/reference/nodeModulesPackageImports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).js b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).js rename to tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).symbols b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).types b/tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesPackagePatternExports(module=node12).types rename to tests/baselines/reference/nodeModulesPackagePatternExports(module=node16).types diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).errors.txt deleted file mode 100644 index 6c400a3f69c..00000000000 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).errors.txt +++ /dev/null @@ -1,120 +0,0 @@ -tests/cases/conformance/node/index.cts(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/index.cts(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/index.cts(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/index.mts(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(2,23): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(3,23): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/index.ts(4,24): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.cts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.cts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.mts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.mts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.mts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. -tests/cases/conformance/node/node_modules/inner/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - - -==== tests/cases/conformance/node/index.ts (3 errors) ==== - // esm format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/index.mts (3 errors) ==== - // esm format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/index.cts (3 errors) ==== - // cjs format file - import * as cjsi from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjsi from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as typei from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - cjsi; - mjsi; - typei; -==== tests/cases/conformance/node/node_modules/inner/index.d.ts (3 errors) ==== - // cjs format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/node_modules/inner/index.d.mts (3 errors) ==== - // esm format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/node_modules/inner/index.d.cts (3 errors) ==== - // cjs format file - import * as cjs from "inner/cjs/index.cjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/cjs/index.cjs' or its corresponding type declarations. - import * as mjs from "inner/mjs/index.mjs"; - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/mjs/index.mjs' or its corresponding type declarations. - import * as type from "inner/js/index.js"; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'inner/js/index.js' or its corresponding type declarations. - export { cjs }; - export { mjs }; - export { type }; -==== tests/cases/conformance/node/package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module", - } -==== tests/cases/conformance/node/node_modules/inner/package.json (0 errors) ==== - { - "name": "inner", - "private": true, - "exports": { - "./cjs/*.cjs": "./*.cjs", - "./mjs/*.mjs": "./*.mjs", - "./js/*.js": "./*.js" - } - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).errors.txt b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).errors.txt new file mode 100644 index 00000000000..9aa041ab418 --- /dev/null +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).errors.txt @@ -0,0 +1,78 @@ +tests/cases/conformance/node/index.cts(3,23): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +tests/cases/conformance/node/node_modules/inner/index.d.cts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +tests/cases/conformance/node/node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'. +tests/cases/conformance/node/node_modules/inner/index.d.ts(3,22): error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + + +==== tests/cases/conformance/node/index.ts (0 errors) ==== + // esm format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/index.mts (0 errors) ==== + // esm format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/index.cts (1 errors) ==== + // cjs format file + import * as cjsi from "inner/cjs/index.cjs"; + import * as mjsi from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as typei from "inner/js/index.js"; + cjsi; + mjsi; + typei; +==== tests/cases/conformance/node/node_modules/inner/index.d.ts (2 errors) ==== + // cjs format file + import * as cjs from "inner/cjs/index.cjs"; + ~~~ +!!! error TS2303: Circular definition of import alias 'cjs'. + import * as mjs from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/node_modules/inner/index.d.mts (0 errors) ==== + // esm format file + import * as cjs from "inner/cjs/index.cjs"; + import * as mjs from "inner/mjs/index.mjs"; + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/node_modules/inner/index.d.cts (1 errors) ==== + // cjs format file + import * as cjs from "inner/cjs/index.cjs"; + import * as mjs from "inner/mjs/index.mjs"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1471: Module 'inner/mjs/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. + import * as type from "inner/js/index.js"; + export { cjs }; + export { mjs }; + export { type }; +==== tests/cases/conformance/node/package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module", + } +==== tests/cases/conformance/node/node_modules/inner/package.json (0 errors) ==== + { + "name": "inner", + "private": true, + "exports": { + "./cjs/*.cjs": "./*.cjs", + "./mjs/*.mjs": "./*.mjs", + "./js/*.js": "./*.js" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).js b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).js rename to tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).js diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).symbols b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).symbols similarity index 81% rename from tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).symbols rename to tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).symbols index 0a9b4ceb3a0..59394e7d56d 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).symbols +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).symbols @@ -70,13 +70,13 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.ts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.ts, 4, 8)) +>cjs : Symbol(mjs.cjs.cjs.type.cjs, Decl(index.d.ts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.ts, 5, 8)) +>mjs : Symbol(mjs.cjs.cjs.type.mjs, Decl(index.d.ts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.ts, 6, 8)) +>type : Symbol(mjs.cjs.cjs.type.type, Decl(index.d.ts, 6, 8)) === tests/cases/conformance/node/node_modules/inner/index.d.mts === // esm format file @@ -90,13 +90,13 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.mts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.mts, 4, 8)) +>cjs : Symbol(cjs.cjs.mjs.cjs, Decl(index.d.mts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.mts, 5, 8)) +>mjs : Symbol(cjs.cjs.mjs.mjs, Decl(index.d.mts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.mts, 6, 8)) +>type : Symbol(cjs.cjs.mjs.type, Decl(index.d.mts, 6, 8)) === tests/cases/conformance/node/node_modules/inner/index.d.cts === // cjs format file @@ -110,11 +110,11 @@ import * as type from "inner/js/index.js"; >type : Symbol(type, Decl(index.d.cts, 3, 6)) export { cjs }; ->cjs : Symbol(cjs, Decl(index.d.cts, 4, 8)) +>cjs : Symbol(cjs.cjs, Decl(index.d.cts, 4, 8)) export { mjs }; ->mjs : Symbol(mjs, Decl(index.d.cts, 5, 8)) +>mjs : Symbol(cjs.mjs, Decl(index.d.cts, 5, 8)) export { type }; ->type : Symbol(type, Decl(index.d.cts, 6, 8)) +>type : Symbol(cjs.type, Decl(index.d.cts, 6, 8)) diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).types b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).types similarity index 61% rename from tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).types rename to tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).types index c7f76095969..f72f1247699 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node12).types +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).types @@ -1,62 +1,62 @@ === tests/cases/conformance/node/index.ts === // esm format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof typei cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs typei; ->typei : any +>typei : typeof typei === tests/cases/conformance/node/index.mts === // esm format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof typei cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.cjs.mjs typei; ->typei : any +>typei : typeof typei === tests/cases/conformance/node/index.cts === // cjs format file import * as cjsi from "inner/cjs/index.cjs"; ->cjsi : any +>cjsi : typeof cjsi import * as mjsi from "inner/mjs/index.mjs"; ->mjsi : any +>mjsi : typeof cjsi.mjs import * as typei from "inner/js/index.js"; ->typei : any +>typei : typeof cjsi.mjs.cjs.type cjsi; ->cjsi : any +>cjsi : typeof cjsi mjsi; ->mjsi : any +>mjsi : typeof cjsi.mjs typei; ->typei : any +>typei : typeof cjsi.mjs.cjs.type === tests/cases/conformance/node/node_modules/inner/index.d.ts === // cjs format file @@ -64,57 +64,57 @@ import * as cjs from "inner/cjs/index.cjs"; >cjs : any import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof mjs.cjs.cjs.type export { cjs }; >cjs : any export { mjs }; ->mjs : any +>mjs : typeof mjs export { type }; ->type : any +>type : typeof mjs.cjs.cjs.type === tests/cases/conformance/node/node_modules/inner/index.d.mts === // esm format file import * as cjs from "inner/cjs/index.cjs"; ->cjs : any +>cjs : typeof cjs import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof cjs.cjs.mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof cjs.cjs.mjs.type export { cjs }; ->cjs : any +>cjs : typeof cjs export { mjs }; ->mjs : any +>mjs : typeof cjs.cjs.mjs export { type }; ->type : any +>type : typeof cjs.cjs.mjs.type === tests/cases/conformance/node/node_modules/inner/index.d.cts === // cjs format file import * as cjs from "inner/cjs/index.cjs"; ->cjs : any +>cjs : typeof cjs import * as mjs from "inner/mjs/index.mjs"; ->mjs : any +>mjs : typeof cjs.mjs import * as type from "inner/js/index.js"; ->type : any +>type : typeof cjs.mjs.cjs.type export { cjs }; ->cjs : any +>cjs : typeof cjs export { mjs }; ->mjs : any +>mjs : typeof cjs.mjs export { type }; ->type : any +>type : typeof cjs.mjs.cjs.type diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).errors.txt b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).errors.txt deleted file mode 100644 index 4200a11e7ba..00000000000 --- a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).errors.txt +++ /dev/null @@ -1,39 +0,0 @@ -tests/cases/conformance/node/index.mts(1,17): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.mts(3,21): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.ts(1,17): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.ts(3,21): error TS7062: JSON imports are experimental in ES module mode imports. - - -==== tests/cases/conformance/node/index.ts (2 errors) ==== - import pkg from "./package.json" - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const name = pkg.name; - import * as ns from "./package.json"; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/index.cts (0 errors) ==== - import pkg from "./package.json" - export const name = pkg.name; - import * as ns from "./package.json"; - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/index.mts (2 errors) ==== - import pkg from "./package.json" - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const name = pkg.name; - import * as ns from "./package.json"; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/package.json (0 errors) ==== - { - "name": "pkg", - "version": "0.0.1", - "type": "module", - "default": "misedirection" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).js b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).js rename to tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).js diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).symbols b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).symbols rename to tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).types b/tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesResolveJsonModule(module=node12).types rename to tests/baselines/reference/nodeModulesResolveJsonModule(module=node16).types diff --git a/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).errors.txt deleted file mode 100644 index 4200a11e7ba..00000000000 --- a/tests/baselines/reference/nodeModulesResolveJsonModule(module=nodenext).errors.txt +++ /dev/null @@ -1,39 +0,0 @@ -tests/cases/conformance/node/index.mts(1,17): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.mts(3,21): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.ts(1,17): error TS7062: JSON imports are experimental in ES module mode imports. -tests/cases/conformance/node/index.ts(3,21): error TS7062: JSON imports are experimental in ES module mode imports. - - -==== tests/cases/conformance/node/index.ts (2 errors) ==== - import pkg from "./package.json" - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const name = pkg.name; - import * as ns from "./package.json"; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/index.cts (0 errors) ==== - import pkg from "./package.json" - export const name = pkg.name; - import * as ns from "./package.json"; - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/index.mts (2 errors) ==== - import pkg from "./package.json" - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const name = pkg.name; - import * as ns from "./package.json"; - ~~~~~~~~~~~~~~~~ -!!! error TS7062: JSON imports are experimental in ES module mode imports. - export const thing = ns; - export const name2 = ns.default.name; -==== tests/cases/conformance/node/package.json (0 errors) ==== - { - "name": "pkg", - "version": "0.0.1", - "type": "module", - "default": "misedirection" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).errors.txt b/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).js b/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).js rename to tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).js diff --git a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).symbols b/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).symbols rename to tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).types b/tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node12).types rename to tests/baselines/reference/nodeModulesSynchronousCallErrors(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).errors.txt deleted file mode 100644 index 12596b85ab2..00000000000 --- a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -tests/cases/conformance/node/index.ts(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/index.ts(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/subfolder/index.ts(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/subfolder/index.ts(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - - -==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ==== - // cjs format file - const x = await 1; - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - export {x}; - for await (const y of []) {} - ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/index.ts (2 errors) ==== - // esm format file - const x = await 1; - ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. - export {x}; - for await (const y of []) {} - ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/conformance/node/package.json (0 errors) ==== - { - "name": "package", - "private": true, - "type": "module" - } -==== tests/cases/conformance/node/subfolder/package.json (0 errors) ==== - { - "type": "commonjs" - } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).errors.txt b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).errors.txt new file mode 100644 index 00000000000..00001d997b4 --- /dev/null +++ b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).errors.txt @@ -0,0 +1,28 @@ +tests/cases/conformance/node/subfolder/index.ts(2,11): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +tests/cases/conformance/node/subfolder/index.ts(4,5): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. + + +==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ==== + // cjs format file + const x = await 1; + ~~~~~ +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. + export {x}; + for await (const y of []) {} + ~~~~~ +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +==== tests/cases/conformance/node/index.ts (0 errors) ==== + // esm format file + const x = await 1; + export {x}; + for await (const y of []) {} +==== tests/cases/conformance/node/package.json (0 errors) ==== + { + "name": "package", + "private": true, + "type": "module" + } +==== tests/cases/conformance/node/subfolder/package.json (0 errors) ==== + { + "type": "commonjs" + } \ No newline at end of file diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).js b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).js rename to tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).symbols b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).symbols rename to tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).types b/tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTopLevelAwait(module=node12).types rename to tests/baselines/reference/nodeModulesTopLevelAwait(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTopLevelAwait(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesTopLevelAwait(module=nodenext).errors.txt index 140c9f2c32c..00001d997b4 100644 --- a/tests/baselines/reference/nodeModulesTopLevelAwait(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesTopLevelAwait(module=nodenext).errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/node/subfolder/index.ts(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/node/subfolder/index.ts(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/node/subfolder/index.ts(2,11): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. +tests/cases/conformance/node/subfolder/index.ts(4,5): error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. ==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ==== // cjs format file const x = await 1; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. export {x}; for await (const y of []) {} ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1309: The current file is a CommonJS module and cannot use 'await' at the top level. ==== tests/cases/conformance/node/index.ts (0 errors) ==== // esm format file const x = await 1; diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit2(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit3(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit4(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit5(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit6(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeDeclarationEmit7(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride1(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride2(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride3(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride4(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverride5(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).errors.txt rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).errors.txt diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).js b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).js rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).symbols b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).symbols rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).types b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node12).types rename to tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideModeError(module=node16).types diff --git a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideOldResolutionError.errors.txt b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideOldResolutionError.errors.txt index ee262510ffd..05f937c37ad 100644 --- a/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideOldResolutionError.errors.txt +++ b/tests/baselines/reference/nodeModulesTripleSlashReferenceModeOverrideOldResolutionError.errors.txt @@ -1,6 +1,6 @@ -/index.ts(1,23): error TS1452: Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`. +/index.ts(1,23): error TS1452: Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`. /index.ts(1,23): error TS2688: Cannot find type definition file for 'pkg'. -/index.ts(2,23): error TS1452: Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`. +/index.ts(2,23): error TS1452: Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`. /index.ts(2,23): error TS2688: Cannot find type definition file for 'pkg'. /index.ts(3,1): error TS2304: Cannot find name 'foo'. /index.ts(4,1): error TS2304: Cannot find name 'bar'. @@ -9,12 +9,12 @@ ==== /index.ts (6 errors) ==== /// ~~~ -!!! error TS1452: Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`. +!!! error TS1452: Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`. ~~~ !!! error TS2688: Cannot find type definition file for 'pkg'. /// ~~~ -!!! error TS1452: Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`. +!!! error TS1452: Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`. ~~~ !!! error TS2688: Cannot find type definition file for 'pkg'. foo; // `resolution-mode` is an error in old resolution settings, which resolves is arbitrary diff --git a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).js b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js similarity index 100% rename from tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).js rename to tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).js diff --git a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).symbols b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).symbols rename to tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).symbols diff --git a/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).types b/tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).types similarity index 100% rename from tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node12).types rename to tests/baselines/reference/nodeModulesTypesVersionPackageExports(module=node16).types diff --git a/tests/baselines/reference/nodeNextImportModeImplicitIndexResolution.errors.txt b/tests/baselines/reference/nodeNextImportModeImplicitIndexResolution.errors.txt index cf759f6040d..20f2430229a 100644 --- a/tests/baselines/reference/nodeNextImportModeImplicitIndexResolution.errors.txt +++ b/tests/baselines/reference/nodeNextImportModeImplicitIndexResolution.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/index.ts(2,31): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. -tests/cases/compiler/index.ts(3,31): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/compiler/index.ts(2,31): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. +tests/cases/compiler/index.ts(3,31): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. ==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ==== @@ -24,8 +24,8 @@ tests/cases/compiler/index.ts(3,31): error TS2834: Relative import paths need ex import { item } from "pkg"; // should work (`index.js` is assumed to be the entrypoint for packages found via nonrelative import) import { item as item2 } from "./pkg"; // shouldn't work (`index.js` is _not_ assumed to be the entrypoint for packages found via relative import) ~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. import { item as item3 } from "./node_modules/pkg" // _even if they're in a node_modules folder_ ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. +!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path. \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextPackageImportMapRootDir.js b/tests/baselines/reference/nodeNextPackageImportMapRootDir.js new file mode 100644 index 00000000000..df6506fa35c --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageImportMapRootDir.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/nodeNextPackageImportMapRootDir.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "imports": { + "#dep": "./dist/index.js" + } +} +//// [index.ts] +import * as me from "#dep"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "#dep"; +me.thing(); +export function thing() { } diff --git a/tests/baselines/reference/nodeNextPackageImportMapRootDir.symbols b/tests/baselines/reference/nodeNextPackageImportMapRootDir.symbols new file mode 100644 index 00000000000..f03b685e938 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageImportMapRootDir.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.ts === +import * as me from "#dep"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageImportMapRootDir.types b/tests/baselines/reference/nodeNextPackageImportMapRootDir.types new file mode 100644 index 00000000000..445dd91324a --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageImportMapRootDir.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/index.ts === +import * as me from "#dep"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.errors.txt b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.errors.txt new file mode 100644 index 00000000000..6577aed8336 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.errors.txt @@ -0,0 +1,19 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. + + +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. +==== tests/cases/compiler/package.json (0 errors) ==== + { + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + } + } +==== tests/cases/compiler/index.ts (0 errors) ==== + import * as me from "@this/package"; + + me.thing(); + + export function thing(): void {} + \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.js new file mode 100644 index 00000000000..d4451ed91fc --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDir.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + } +} +//// [index.ts] +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "@this/package"; +me.thing(); +export function thing() { } diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.symbols new file mode 100644 index 00000000000..8bcf39cdd7a --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.types new file mode 100644 index 00000000000..a22456ef499 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.errors.txt b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.errors.txt new file mode 100644 index 00000000000..6ccce9cf141 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.errors.txt @@ -0,0 +1,22 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. + + +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. +==== tests/cases/compiler/package.json (0 errors) ==== + { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } +==== tests/cases/compiler/index.ts (0 errors) ==== + import * as me from "@this/package"; + + me.thing(); + + export function thing(): void {} + \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.js new file mode 100644 index 00000000000..d035a43f7c0 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.js @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDir.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +//// [index.ts] +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "@this/package"; +me.thing(); +export function thing() { } + + +//// [index.d.ts] +export declare function thing(): void; diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.symbols new file mode 100644 index 00000000000..8bcf39cdd7a --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.types new file mode 100644 index 00000000000..a22456ef499 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.js new file mode 100644 index 00000000000..0406bf88612 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.js @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirComposite.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +//// [index.ts] +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "@this/package"; +me.thing(); +export function thing() { } + + +//// [index.d.ts] +export declare function thing(): void; diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.symbols new file mode 100644 index 00000000000..8bcf39cdd7a --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.types new file mode 100644 index 00000000000..a22456ef499 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.js new file mode 100644 index 00000000000..21197f9881e --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.js @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +//// [index.ts] +export {srcthing as thing} from "./src/thing.js"; +//// [thing.ts] +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; + +me.thing(); + +export function srcthing(): void {} + + + +//// [thing.js] +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +me.thing(); +export function srcthing() { } + + +//// [thing.d.ts] +export declare function srcthing(): void; diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.symbols new file mode 100644 index 00000000000..38fc4efe336 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/src/thing.ts === +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +>me : Symbol(me, Decl(thing.ts, 7, 6)) + +me.thing(); +>me.thing : Symbol(me.thing, Decl(index.ts, 0, 8)) +>me : Symbol(me, Decl(thing.ts, 7, 6)) +>thing : Symbol(me.thing, Decl(index.ts, 0, 8)) + +export function srcthing(): void {} +>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) + + +=== tests/cases/compiler/index.ts === +export {srcthing as thing} from "./src/thing.js"; +>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) +>thing : Symbol(thing, Decl(index.ts, 0, 8)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.types new file mode 100644 index 00000000000..2d4d2bcd994 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.types @@ -0,0 +1,26 @@ +=== tests/cases/compiler/src/thing.ts === +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function srcthing(): void {} +>srcthing : () => void + + +=== tests/cases/compiler/index.ts === +export {srcthing as thing} from "./src/thing.js"; +>srcthing : () => void +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.errors.txt b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.errors.txt new file mode 100644 index 00000000000..14365276c31 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.errors.txt @@ -0,0 +1,41 @@ +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. + + +!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'tests/cases/compiler/package.json'. Supply the `rootDir` compiler option to disambiguate. +==== tests/cases/compiler/tsconfig.json (0 errors) ==== + { + "compilerOptions": { + "module": "nodenext", + "outDir": "./dist", + "declarationDir": "./types", + "declaration": true + } + } +==== tests/cases/compiler/src/thing.ts (0 errors) ==== + // The following import should cause `index.ts` + // to be included in the build, which will, + // in turn, cause the common src directory to not be `src` + // (the harness is wierd here in that noImplicitReferences makes only + // this file get loaded as an entrypoint and emitted, while on the + // real command-line we'll crawl the imports for that set - a limitation + // of the harness, I suppose) + import * as me from "@this/package"; + + me.thing(); + + export function srcthing(): void {} + + +==== tests/cases/compiler/package.json (0 errors) ==== + { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } +==== tests/cases/compiler/index.ts (0 errors) ==== + export {srcthing as thing} from "./src/thing.js"; \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.js new file mode 100644 index 00000000000..433a7dfc989 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.js @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +//// [index.ts] +export {srcthing as thing} from "./src/thing.js"; +//// [thing.ts] +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; + +me.thing(); + +export function srcthing(): void {} + + + +//// [thing.js] +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +me.thing(); +export function srcthing() { } + + +//// [thing.d.ts] +export declare function srcthing(): void; diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.symbols new file mode 100644 index 00000000000..38fc4efe336 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.symbols @@ -0,0 +1,25 @@ +=== tests/cases/compiler/src/thing.ts === +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +>me : Symbol(me, Decl(thing.ts, 7, 6)) + +me.thing(); +>me.thing : Symbol(me.thing, Decl(index.ts, 0, 8)) +>me : Symbol(me, Decl(thing.ts, 7, 6)) +>thing : Symbol(me.thing, Decl(index.ts, 0, 8)) + +export function srcthing(): void {} +>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) + + +=== tests/cases/compiler/index.ts === +export {srcthing as thing} from "./src/thing.js"; +>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) +>thing : Symbol(thing, Decl(index.ts, 0, 8)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.types new file mode 100644 index 00000000000..2d4d2bcd994 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.types @@ -0,0 +1,26 @@ +=== tests/cases/compiler/src/thing.ts === +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function srcthing(): void {} +>srcthing : () => void + + +=== tests/cases/compiler/index.ts === +export {srcthing as thing} from "./src/thing.js"; +>srcthing : () => void +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.js new file mode 100644 index 00000000000..683dad9fb12 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.js @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +//// [index.ts] +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "@this/package"; +me.thing(); +export function thing() { } + + +//// [index.d.ts] +export declare function thing(): void; diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.symbols new file mode 100644 index 00000000000..beb1169cc73 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.symbols @@ -0,0 +1,12 @@ +=== /pkg/src/index.ts === +import * as me from "@this/package"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.types new file mode 100644 index 00000000000..17098101fce --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.types @@ -0,0 +1,13 @@ +=== /pkg/src/index.ts === +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.js b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.js new file mode 100644 index 00000000000..7dad992a946 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts] //// + +//// [package.json] +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + } +} +//// [index.ts] +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} + + +//// [index.js] +import * as me from "@this/package"; +me.thing(); +export function thing() { } diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.symbols b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.symbols new file mode 100644 index 00000000000..8bcf39cdd7a --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : Symbol(me, Decl(index.ts, 0, 6)) + +me.thing(); +>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) +>me : Symbol(me, Decl(index.ts, 0, 6)) +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + +export function thing(): void {} +>thing : Symbol(thing, Decl(index.ts, 2, 11)) + diff --git a/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.types b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.types new file mode 100644 index 00000000000..a22456ef499 --- /dev/null +++ b/tests/baselines/reference/nodeNextPackageSelfNameWithOutDirRootDir.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/index.ts === +import * as me from "@this/package"; +>me : typeof me + +me.thing(); +>me.thing() : void +>me.thing : () => void +>me : typeof me +>thing : () => void + +export function thing(): void {} +>thing : () => void + diff --git a/tests/baselines/reference/nodePackageSelfName(module=node12).errors.txt b/tests/baselines/reference/nodePackageSelfName(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodePackageSelfName(module=node12).errors.txt rename to tests/baselines/reference/nodePackageSelfName(module=node16).errors.txt diff --git a/tests/baselines/reference/nodePackageSelfName(module=node12).js b/tests/baselines/reference/nodePackageSelfName(module=node16).js similarity index 100% rename from tests/baselines/reference/nodePackageSelfName(module=node12).js rename to tests/baselines/reference/nodePackageSelfName(module=node16).js diff --git a/tests/baselines/reference/nodePackageSelfName(module=node12).symbols b/tests/baselines/reference/nodePackageSelfName(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodePackageSelfName(module=node12).symbols rename to tests/baselines/reference/nodePackageSelfName(module=node16).symbols diff --git a/tests/baselines/reference/nodePackageSelfName(module=node12).types b/tests/baselines/reference/nodePackageSelfName(module=node16).types similarity index 100% rename from tests/baselines/reference/nodePackageSelfName(module=node12).types rename to tests/baselines/reference/nodePackageSelfName(module=node16).types diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=node12).errors.txt b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/nodePackageSelfNameScoped(module=node12).errors.txt rename to tests/baselines/reference/nodePackageSelfNameScoped(module=node16).errors.txt diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=node12).js b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js similarity index 100% rename from tests/baselines/reference/nodePackageSelfNameScoped(module=node12).js rename to tests/baselines/reference/nodePackageSelfNameScoped(module=node16).js diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=node12).symbols b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).symbols similarity index 100% rename from tests/baselines/reference/nodePackageSelfNameScoped(module=node12).symbols rename to tests/baselines/reference/nodePackageSelfNameScoped(module=node16).symbols diff --git a/tests/baselines/reference/nodePackageSelfNameScoped(module=node12).types b/tests/baselines/reference/nodePackageSelfNameScoped(module=node16).types similarity index 100% rename from tests/baselines/reference/nodePackageSelfNameScoped(module=node12).types rename to tests/baselines/reference/nodePackageSelfNameScoped(module=node16).types diff --git a/tests/baselines/reference/numericStringLiteralTypes.js b/tests/baselines/reference/numericStringLiteralTypes.js new file mode 100644 index 00000000000..975ca1d3179 --- /dev/null +++ b/tests/baselines/reference/numericStringLiteralTypes.js @@ -0,0 +1,80 @@ +//// [numericStringLiteralTypes.ts] +type T0 = string & `${string}`; // string +type T1 = string & `${number}`; // `${number} +type T2 = string & `${bigint}`; // `${bigint} +type T3 = string & `${T}`; // `${T} +type T4 = string & `${Capitalize<`${T}`>}`; // `${Capitalize}` + +function f1(a: boolean[], x: `${number}`) { + let s = a[x]; // boolean +} + +function f2(a: boolean[], x: number | `${number}`) { + let s = a[x]; // boolean +} + +type T10 = boolean[][`${number}`]; // boolean +type T11 = boolean[][number | `${number}`]; // boolean + +type T20 = T; +type T21 = { [K in keyof T]: T20 }; + +type Container = { + value: T +} + +type UnwrapContainers[]> = { [K in keyof T]: T[K]['value'] }; + +declare function createContainer(value: T): Container; + +declare function f[]>(containers: [...T], callback: (...values: UnwrapContainers) => void): void; + +const container1 = createContainer('hi') +const container2 = createContainer(2) + +f([container1, container2], (value1, value2) => { + value1; // string + value2; // number +}); + + +//// [numericStringLiteralTypes.js] +"use strict"; +function f1(a, x) { + var s = a[x]; // boolean +} +function f2(a, x) { + var s = a[x]; // boolean +} +var container1 = createContainer('hi'); +var container2 = createContainer(2); +f([container1, container2], function (value1, value2) { + value1; // string + value2; // number +}); + + +//// [numericStringLiteralTypes.d.ts] +declare type T0 = string & `${string}`; +declare type T1 = string & `${number}`; +declare type T2 = string & `${bigint}`; +declare type T3 = string & `${T}`; +declare type T4 = string & `${Capitalize<`${T}`>}`; +declare function f1(a: boolean[], x: `${number}`): void; +declare function f2(a: boolean[], x: number | `${number}`): void; +declare type T10 = boolean[][`${number}`]; +declare type T11 = boolean[][number | `${number}`]; +declare type T20 = T; +declare type T21 = { + [K in keyof T]: T20; +}; +declare type Container = { + value: T; +}; +declare type UnwrapContainers[]> = { + [K in keyof T]: T[K]['value']; +}; +declare function createContainer(value: T): Container; +declare function f[]>(containers: [...T], callback: (...values: UnwrapContainers) => void): void; +declare const container1: Container; +declare const container2: Container; diff --git a/tests/baselines/reference/numericStringLiteralTypes.symbols b/tests/baselines/reference/numericStringLiteralTypes.symbols new file mode 100644 index 00000000000..33d2a1633a6 --- /dev/null +++ b/tests/baselines/reference/numericStringLiteralTypes.symbols @@ -0,0 +1,122 @@ +=== tests/cases/conformance/types/literal/numericStringLiteralTypes.ts === +type T0 = string & `${string}`; // string +>T0 : Symbol(T0, Decl(numericStringLiteralTypes.ts, 0, 0)) + +type T1 = string & `${number}`; // `${number} +>T1 : Symbol(T1, Decl(numericStringLiteralTypes.ts, 0, 31)) + +type T2 = string & `${bigint}`; // `${bigint} +>T2 : Symbol(T2, Decl(numericStringLiteralTypes.ts, 1, 31)) + +type T3 = string & `${T}`; // `${T} +>T3 : Symbol(T3, Decl(numericStringLiteralTypes.ts, 2, 31)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 3, 8)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 3, 8)) + +type T4 = string & `${Capitalize<`${T}`>}`; // `${Capitalize}` +>T4 : Symbol(T4, Decl(numericStringLiteralTypes.ts, 3, 44)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 4, 8)) +>Capitalize : Symbol(Capitalize, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 4, 8)) + +function f1(a: boolean[], x: `${number}`) { +>f1 : Symbol(f1, Decl(numericStringLiteralTypes.ts, 4, 61)) +>a : Symbol(a, Decl(numericStringLiteralTypes.ts, 6, 12)) +>x : Symbol(x, Decl(numericStringLiteralTypes.ts, 6, 25)) + + let s = a[x]; // boolean +>s : Symbol(s, Decl(numericStringLiteralTypes.ts, 7, 7)) +>a : Symbol(a, Decl(numericStringLiteralTypes.ts, 6, 12)) +>x : Symbol(x, Decl(numericStringLiteralTypes.ts, 6, 25)) +} + +function f2(a: boolean[], x: number | `${number}`) { +>f2 : Symbol(f2, Decl(numericStringLiteralTypes.ts, 8, 1)) +>a : Symbol(a, Decl(numericStringLiteralTypes.ts, 10, 12)) +>x : Symbol(x, Decl(numericStringLiteralTypes.ts, 10, 25)) + + let s = a[x]; // boolean +>s : Symbol(s, Decl(numericStringLiteralTypes.ts, 11, 7)) +>a : Symbol(a, Decl(numericStringLiteralTypes.ts, 10, 12)) +>x : Symbol(x, Decl(numericStringLiteralTypes.ts, 10, 25)) +} + +type T10 = boolean[][`${number}`]; // boolean +>T10 : Symbol(T10, Decl(numericStringLiteralTypes.ts, 12, 1)) + +type T11 = boolean[][number | `${number}`]; // boolean +>T11 : Symbol(T11, Decl(numericStringLiteralTypes.ts, 14, 34)) + +type T20 = T; +>T20 : Symbol(T20, Decl(numericStringLiteralTypes.ts, 15, 43)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 17, 9)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 17, 9)) + +type T21 = { [K in keyof T]: T20 }; +>T21 : Symbol(T21, Decl(numericStringLiteralTypes.ts, 17, 45)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 18, 9)) +>K : Symbol(K, Decl(numericStringLiteralTypes.ts, 18, 35)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 18, 9)) +>T20 : Symbol(T20, Decl(numericStringLiteralTypes.ts, 15, 43)) +>K : Symbol(K, Decl(numericStringLiteralTypes.ts, 18, 35)) + +type Container = { +>Container : Symbol(Container, Decl(numericStringLiteralTypes.ts, 18, 59)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 20, 15)) + + value: T +>value : Symbol(value, Decl(numericStringLiteralTypes.ts, 20, 21)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 20, 15)) +} + +type UnwrapContainers[]> = { [K in keyof T]: T[K]['value'] }; +>UnwrapContainers : Symbol(UnwrapContainers, Decl(numericStringLiteralTypes.ts, 22, 1)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 24, 22)) +>Container : Symbol(Container, Decl(numericStringLiteralTypes.ts, 18, 59)) +>K : Symbol(K, Decl(numericStringLiteralTypes.ts, 24, 59)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 24, 22)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 24, 22)) +>K : Symbol(K, Decl(numericStringLiteralTypes.ts, 24, 59)) + +declare function createContainer(value: T): Container; +>createContainer : Symbol(createContainer, Decl(numericStringLiteralTypes.ts, 24, 90)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 26, 33)) +>value : Symbol(value, Decl(numericStringLiteralTypes.ts, 26, 52)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 26, 33)) +>Container : Symbol(Container, Decl(numericStringLiteralTypes.ts, 18, 59)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 26, 33)) + +declare function f[]>(containers: [...T], callback: (...values: UnwrapContainers) => void): void; +>f : Symbol(f, Decl(numericStringLiteralTypes.ts, 26, 76)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 28, 19)) +>Container : Symbol(Container, Decl(numericStringLiteralTypes.ts, 18, 59)) +>containers : Symbol(containers, Decl(numericStringLiteralTypes.ts, 28, 51)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 28, 19)) +>callback : Symbol(callback, Decl(numericStringLiteralTypes.ts, 28, 70)) +>values : Symbol(values, Decl(numericStringLiteralTypes.ts, 28, 82)) +>UnwrapContainers : Symbol(UnwrapContainers, Decl(numericStringLiteralTypes.ts, 22, 1)) +>T : Symbol(T, Decl(numericStringLiteralTypes.ts, 28, 19)) + +const container1 = createContainer('hi') +>container1 : Symbol(container1, Decl(numericStringLiteralTypes.ts, 30, 5)) +>createContainer : Symbol(createContainer, Decl(numericStringLiteralTypes.ts, 24, 90)) + +const container2 = createContainer(2) +>container2 : Symbol(container2, Decl(numericStringLiteralTypes.ts, 31, 5)) +>createContainer : Symbol(createContainer, Decl(numericStringLiteralTypes.ts, 24, 90)) + +f([container1, container2], (value1, value2) => { +>f : Symbol(f, Decl(numericStringLiteralTypes.ts, 26, 76)) +>container1 : Symbol(container1, Decl(numericStringLiteralTypes.ts, 30, 5)) +>container2 : Symbol(container2, Decl(numericStringLiteralTypes.ts, 31, 5)) +>value1 : Symbol(value1, Decl(numericStringLiteralTypes.ts, 33, 29)) +>value2 : Symbol(value2, Decl(numericStringLiteralTypes.ts, 33, 36)) + + value1; // string +>value1 : Symbol(value1, Decl(numericStringLiteralTypes.ts, 33, 29)) + + value2; // number +>value2 : Symbol(value2, Decl(numericStringLiteralTypes.ts, 33, 36)) + +}); + diff --git a/tests/baselines/reference/numericStringLiteralTypes.types b/tests/baselines/reference/numericStringLiteralTypes.types new file mode 100644 index 00000000000..245a3a674ba --- /dev/null +++ b/tests/baselines/reference/numericStringLiteralTypes.types @@ -0,0 +1,102 @@ +=== tests/cases/conformance/types/literal/numericStringLiteralTypes.ts === +type T0 = string & `${string}`; // string +>T0 : string + +type T1 = string & `${number}`; // `${number} +>T1 : `${number}` + +type T2 = string & `${bigint}`; // `${bigint} +>T2 : `${bigint}` + +type T3 = string & `${T}`; // `${T} +>T3 : `${T}` + +type T4 = string & `${Capitalize<`${T}`>}`; // `${Capitalize}` +>T4 : `${Capitalize<`${T}`>}` + +function f1(a: boolean[], x: `${number}`) { +>f1 : (a: boolean[], x: `${number}`) => void +>a : boolean[] +>x : `${number}` + + let s = a[x]; // boolean +>s : boolean +>a[x] : boolean +>a : boolean[] +>x : `${number}` +} + +function f2(a: boolean[], x: number | `${number}`) { +>f2 : (a: boolean[], x: number | `${number}`) => void +>a : boolean[] +>x : number | `${number}` + + let s = a[x]; // boolean +>s : boolean +>a[x] : boolean +>a : boolean[] +>x : number | `${number}` +} + +type T10 = boolean[][`${number}`]; // boolean +>T10 : boolean + +type T11 = boolean[][number | `${number}`]; // boolean +>T11 : boolean + +type T20 = T; +>T20 : T + +type T21 = { [K in keyof T]: T20 }; +>T21 : T21 + +type Container = { +>Container : Container + + value: T +>value : T +} + +type UnwrapContainers[]> = { [K in keyof T]: T[K]['value'] }; +>UnwrapContainers : UnwrapContainers + +declare function createContainer(value: T): Container; +>createContainer : (value: T) => Container +>value : T + +declare function f[]>(containers: [...T], callback: (...values: UnwrapContainers) => void): void; +>f : []>(containers: [...T], callback: (...values: UnwrapContainers) => void) => void +>containers : [...T] +>callback : (...values: UnwrapContainers) => void +>values : UnwrapContainers + +const container1 = createContainer('hi') +>container1 : Container +>createContainer('hi') : Container +>createContainer : (value: T) => Container +>'hi' : "hi" + +const container2 = createContainer(2) +>container2 : Container +>createContainer(2) : Container +>createContainer : (value: T) => Container +>2 : 2 + +f([container1, container2], (value1, value2) => { +>f([container1, container2], (value1, value2) => { value1; // string value2; // number}) : void +>f : []>(containers: [...T], callback: (...values: UnwrapContainers) => void) => void +>[container1, container2] : [Container, Container] +>container1 : Container +>container2 : Container +>(value1, value2) => { value1; // string value2; // number} : (value1: string, value2: number) => void +>value1 : string +>value2 : number + + value1; // string +>value1 : string + + value2; // number +>value2 : number + +}); + diff --git a/tests/baselines/reference/parser.forAwait.es2018.errors.txt b/tests/baselines/reference/parser.forAwait.es2018.errors.txt index 1f1f9de0973..4627a2b674a 100644 --- a/tests/baselines/reference/parser.forAwait.es2018.errors.txt +++ b/tests/baselines/reference/parser.forAwait.es2018.errors.txt @@ -8,10 +8,10 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsE tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts(3,9): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts(3,9): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,5): error TS1431: 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. -tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithDeclIsError.ts(1,23): error TS2304: Cannot find name 'y'. tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,5): error TS1431: 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. -tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,12): error TS2304: Cannot find name 'x'. tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.ts(1,17): error TS2304: Cannot find name 'y'. @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t ~~~~~ !!! error TS1431: 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ~ !!! error TS2304: Cannot find name 'y'. } @@ -30,7 +30,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t ~~~~~ !!! error TS1431: 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ~ !!! error TS2304: Cannot find name 'x'. ~ diff --git a/tests/baselines/reference/parserArrowFunctionExpression10.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression10.errors.txt index 43cf9de267b..f562408c93c 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression10.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression10.errors.txt @@ -1,20 +1,20 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,1): error TS2304: Cannot find name 'a'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,6): error TS2304: Cannot find name 'b'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,17): error TS2304: Cannot find name 'd'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,20): error TS1005: ';' expected. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,11): error TS2304: Cannot find name 'c'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,22): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,27): error TS2304: Cannot find name 'f'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(2,1): error TS1005: ':' expected. ==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts (5 errors) ==== a ? (b) : c => (d) : e => f ~ !!! error TS2304: Cannot find name 'a'. - ~ -!!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS2304: Cannot find name 'd'. - ~ -!!! error TS1005: ';' expected. + ~ +!!! error TS2304: Cannot find name 'c'. + ~ +!!! error TS2304: Cannot find name 'e'. ~ !!! error TS2304: Cannot find name 'f'. - \ No newline at end of file + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression10.js b/tests/baselines/reference/parserArrowFunctionExpression10.js index 86e1e61bb07..dde6e364265 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression10.js +++ b/tests/baselines/reference/parserArrowFunctionExpression10.js @@ -3,5 +3,6 @@ a ? (b) : c => (d) : e => f //// [parserArrowFunctionExpression10.js] -a ? (b) : function (c) { return (d); }; -(function (e) { return f; }); +a ? function (b) { return function (d) { return f; }; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression10.symbols b/tests/baselines/reference/parserArrowFunctionExpression10.symbols index f30f0b3e3ca..7e7cdb86a0a 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression10.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression10.symbols @@ -1,5 +1,7 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts === a ? (b) : c => (d) : e => f ->c : Symbol(c, Decl(parserArrowFunctionExpression10.ts, 0, 9)) ->e : Symbol(e, Decl(parserArrowFunctionExpression10.ts, 0, 20)) +>b : Symbol(b, Decl(parserArrowFunctionExpression10.ts, 0, 5)) +>c : Symbol(c) +>d : Symbol(d, Decl(parserArrowFunctionExpression10.ts, 0, 16)) +>e : Symbol(e) diff --git a/tests/baselines/reference/parserArrowFunctionExpression10.types b/tests/baselines/reference/parserArrowFunctionExpression10.types index 8ec7d69c295..25f24b99a46 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression10.types +++ b/tests/baselines/reference/parserArrowFunctionExpression10.types @@ -1,14 +1,12 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts === a ? (b) : c => (d) : e => f ->a ? (b) : c => (d) : any +>a ? (b) : c => (d) : e => f : any >a : any ->(b) : any +>(b) : c => (d) : e => f : (b: any) => c >b : any ->c => (d) : (c: any) => any ->c : any ->(d) : any +>(d) : e => f : (d: any) => e >d : any ->e => f : (e: any) => any ->e : any >f : any +> : any + diff --git a/tests/baselines/reference/parserArrowFunctionExpression11.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression11.errors.txt index 452c9fc6e64..d8abfd83fa4 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression11.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression11.errors.txt @@ -1,11 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,1): error TS2304: Cannot find name 'a'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,5): error TS2304: Cannot find name 'b'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,9): error TS2304: Cannot find name 'c'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,14): error TS2304: Cannot find name 'd'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,19): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,24): error TS2304: Cannot find name 'f'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(2,1): error TS1005: ':' expected. -==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts (5 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts (6 errors) ==== a ? b ? c : (d) : e => f ~ !!! error TS2304: Cannot find name 'a'. @@ -13,8 +14,10 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowF !!! error TS2304: Cannot find name 'b'. ~ !!! error TS2304: Cannot find name 'c'. - ~ -!!! error TS2304: Cannot find name 'd'. + ~ +!!! error TS2304: Cannot find name 'e'. ~ !!! error TS2304: Cannot find name 'f'. - \ No newline at end of file + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression11.js b/tests/baselines/reference/parserArrowFunctionExpression11.js index 8562a6b57f9..bc2dcf4980b 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression11.js +++ b/tests/baselines/reference/parserArrowFunctionExpression11.js @@ -3,4 +3,6 @@ a ? b ? c : (d) : e => f //// [parserArrowFunctionExpression11.js] -a ? b ? c : (d) : function (e) { return f; }; +a ? b ? c : function (d) { return f; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression11.symbols b/tests/baselines/reference/parserArrowFunctionExpression11.symbols index 361c2e7fd11..f49eae1e16c 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression11.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression11.symbols @@ -1,4 +1,5 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts === a ? b ? c : (d) : e => f ->e : Symbol(e, Decl(parserArrowFunctionExpression11.ts, 0, 17)) +>d : Symbol(d, Decl(parserArrowFunctionExpression11.ts, 0, 13)) +>e : Symbol(e) diff --git a/tests/baselines/reference/parserArrowFunctionExpression11.types b/tests/baselines/reference/parserArrowFunctionExpression11.types index e4e9be428ad..9e3e5438eb6 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression11.types +++ b/tests/baselines/reference/parserArrowFunctionExpression11.types @@ -2,12 +2,12 @@ a ? b ? c : (d) : e => f >a ? b ? c : (d) : e => f : any >a : any ->b ? c : (d) : any +>b ? c : (d) : e => f : any >b : any >c : any ->(d) : any +>(d) : e => f : (d: any) => e >d : any ->e => f : (e: any) => any ->e : any >f : any +> : any + diff --git a/tests/baselines/reference/parserArrowFunctionExpression12.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression12.errors.txt index c6cfd8f9ce8..59fc42b58c9 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression12.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression12.errors.txt @@ -1,14 +1,17 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,1): error TS2304: Cannot find name 'a'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,13): error TS2304: Cannot find name 'c'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,17): error TS2304: Cannot find name 'd'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,22): error TS2304: Cannot find name 'e'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(2,1): error TS1005: ':' expected. -==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts (4 errors) ==== a ? (b) => (c): d => e ~ !!! error TS2304: Cannot find name 'a'. - ~ -!!! error TS2304: Cannot find name 'c'. + ~ +!!! error TS2304: Cannot find name 'd'. ~ !!! error TS2304: Cannot find name 'e'. - \ No newline at end of file + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression12.js b/tests/baselines/reference/parserArrowFunctionExpression12.js index dbee37a2660..b3750be26f2 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression12.js +++ b/tests/baselines/reference/parserArrowFunctionExpression12.js @@ -3,4 +3,6 @@ a ? (b) => (c): d => e //// [parserArrowFunctionExpression12.js] -a ? function (b) { return (c); } : function (d) { return e; }; +a ? function (b) { return function (c) { return e; }; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression12.symbols b/tests/baselines/reference/parserArrowFunctionExpression12.symbols index 3a677172320..d092dfaf00d 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression12.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression12.symbols @@ -1,5 +1,6 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts === a ? (b) => (c): d => e >b : Symbol(b, Decl(parserArrowFunctionExpression12.ts, 0, 5)) ->d : Symbol(d, Decl(parserArrowFunctionExpression12.ts, 0, 15)) +>c : Symbol(c, Decl(parserArrowFunctionExpression12.ts, 0, 12)) +>d : Symbol(d) diff --git a/tests/baselines/reference/parserArrowFunctionExpression12.types b/tests/baselines/reference/parserArrowFunctionExpression12.types index b833ae305a8..bab73d7a2d3 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression12.types +++ b/tests/baselines/reference/parserArrowFunctionExpression12.types @@ -1,12 +1,12 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts === a ? (b) => (c): d => e ->a ? (b) => (c): d => e : (b: any) => any +>a ? (b) => (c): d => e : any >a : any ->(b) => (c) : (b: any) => any +>(b) => (c): d => e : (b: any) => (c: any) => d >b : any ->(c) : any +>(c): d => e : (c: any) => d >c : any ->d => e : (d: any) => any ->d : any >e : any +> : any + diff --git a/tests/baselines/reference/parserArrowFunctionExpression15.js b/tests/baselines/reference/parserArrowFunctionExpression15.js new file mode 100644 index 00000000000..a18efc84f09 --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression15.js @@ -0,0 +1,6 @@ +//// [parserArrowFunctionExpression15.ts] +false ? (param): string => param : null + + +//// [parserArrowFunctionExpression15.js] +false ? function (param) { return param; } : null; diff --git a/tests/baselines/reference/parserArrowFunctionExpression15.symbols b/tests/baselines/reference/parserArrowFunctionExpression15.symbols new file mode 100644 index 00000000000..7cb354c7dc9 --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression15.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression15.ts === +false ? (param): string => param : null +>param : Symbol(param, Decl(parserArrowFunctionExpression15.ts, 0, 9)) +>param : Symbol(param, Decl(parserArrowFunctionExpression15.ts, 0, 9)) + diff --git a/tests/baselines/reference/parserArrowFunctionExpression15.types b/tests/baselines/reference/parserArrowFunctionExpression15.types new file mode 100644 index 00000000000..46407638621 --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression15.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression15.ts === +false ? (param): string => param : null +>false ? (param): string => param : null : (param: any) => string +>false : false +>(param): string => param : (param: any) => string +>param : any +>param : any +>null : null + diff --git a/tests/baselines/reference/parserArrowFunctionExpression16.js b/tests/baselines/reference/parserArrowFunctionExpression16.js new file mode 100644 index 00000000000..8d0404c91c8 --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression16.js @@ -0,0 +1,6 @@ +//// [parserArrowFunctionExpression16.ts] +true ? false ? (param): string => param : null : null + + +//// [parserArrowFunctionExpression16.js] +true ? false ? function (param) { return param; } : null : null; diff --git a/tests/baselines/reference/parserArrowFunctionExpression16.symbols b/tests/baselines/reference/parserArrowFunctionExpression16.symbols new file mode 100644 index 00000000000..f2a4ff04df1 --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression16.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression16.ts === +true ? false ? (param): string => param : null : null +>param : Symbol(param, Decl(parserArrowFunctionExpression16.ts, 0, 16)) +>param : Symbol(param, Decl(parserArrowFunctionExpression16.ts, 0, 16)) + diff --git a/tests/baselines/reference/parserArrowFunctionExpression16.types b/tests/baselines/reference/parserArrowFunctionExpression16.types new file mode 100644 index 00000000000..fffd623adac --- /dev/null +++ b/tests/baselines/reference/parserArrowFunctionExpression16.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression16.ts === +true ? false ? (param): string => param : null : null +>true ? false ? (param): string => param : null : null : (param: any) => string +>true : true +>false ? (param): string => param : null : (param: any) => string +>false : false +>(param): string => param : (param: any) => string +>param : any +>param : any +>null : null +>null : null + diff --git a/tests/baselines/reference/parserArrowFunctionExpression8.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression8.errors.txt index 1678471ae83..8afc1298a29 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression8.errors.txt @@ -1,8 +1,17 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts(1,1): error TS2304: Cannot find name 'x'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts(1,20): error TS2304: Cannot find name 'z'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts(1,28): error TS18004: No value exists in scope for the shorthand property 'z'. Either declare one or provide an initializer. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts(2,1): error TS1005: ':' expected. -==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts (4 errors) ==== x ? y => ({ y }) : z => ({ z }) ~ !!! error TS2304: Cannot find name 'x'. - \ No newline at end of file + ~ +!!! error TS2304: Cannot find name 'z'. + ~ +!!! error TS18004: No value exists in scope for the shorthand property 'z'. Either declare one or provide an initializer. + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression8.js b/tests/baselines/reference/parserArrowFunctionExpression8.js index d34457823bd..a8738ac8603 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8.js +++ b/tests/baselines/reference/parserArrowFunctionExpression8.js @@ -3,4 +3,9 @@ x ? y => ({ y }) : z => ({ z }) //// [parserArrowFunctionExpression8.js] -x ? function (y) { return ({ y: y }); } : function (z) { return ({ z: z }); }; +x ? function (y) { return function (_a) { + var y = _a.y; + return ({ z: z }); +}; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression8.symbols b/tests/baselines/reference/parserArrowFunctionExpression8.symbols index 728cf2a31b7..caae56c76fe 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression8.symbols @@ -2,6 +2,6 @@ x ? y => ({ y }) : z => ({ z }) >y : Symbol(y, Decl(parserArrowFunctionExpression8.ts, 0, 3)) >y : Symbol(y, Decl(parserArrowFunctionExpression8.ts, 0, 11)) ->z : Symbol(z, Decl(parserArrowFunctionExpression8.ts, 0, 18)) +>z : Symbol(z) >z : Symbol(z, Decl(parserArrowFunctionExpression8.ts, 0, 26)) diff --git a/tests/baselines/reference/parserArrowFunctionExpression8.types b/tests/baselines/reference/parserArrowFunctionExpression8.types index 29bdcaa25c9..14d62f307fb 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8.types +++ b/tests/baselines/reference/parserArrowFunctionExpression8.types @@ -1,15 +1,14 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts === x ? y => ({ y }) : z => ({ z }) ->x ? y => ({ y }) : z => ({ z }) : ((y: any) => { y: any; }) | ((z: any) => { z: any; }) +>x ? y => ({ y }) : z => ({ z }) : any >x : any ->y => ({ y }) : (y: any) => { y: any; } +>y => ({ y }) : z => ({ z }) : (y: any) => ({ y }: { y: any; }) => z >y : any ->({ y }) : { y: any; } ->{ y } : { y: any; } +>({ y }) : z => ({ z }) : ({ y }: { y: any; }) => z >y : any ->z => ({ z }) : (z: any) => { z: any; } ->z : any >({ z }) : { z: any; } >{ z } : { z: any; } >z : any +> : any + diff --git a/tests/baselines/reference/parserArrowFunctionExpression8Js.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression8Js.errors.txt index d364171f849..ceb5a1c6168 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8Js.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression8Js.errors.txt @@ -1,8 +1,20 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(1,1): error TS2304: Cannot find name 'x'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(1,20): error TS2304: Cannot find name 'z'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(1,20): error TS8010: Type annotations can only be used in TypeScript files. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(1,28): error TS18004: No value exists in scope for the shorthand property 'z'. Either declare one or provide an initializer. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(2,1): error TS1005: ':' expected. -==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js (5 errors) ==== x ? y => ({ y }) : z => ({ z }) ~ !!! error TS2304: Cannot find name 'x'. - \ No newline at end of file + ~ +!!! error TS2304: Cannot find name 'z'. + ~ +!!! error TS8010: Type annotations can only be used in TypeScript files. + ~ +!!! error TS18004: No value exists in scope for the shorthand property 'z'. Either declare one or provide an initializer. + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression8Js.js b/tests/baselines/reference/parserArrowFunctionExpression8Js.js index 50ba0a4f950..4de39348d9b 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8Js.js +++ b/tests/baselines/reference/parserArrowFunctionExpression8Js.js @@ -3,4 +3,9 @@ x ? y => ({ y }) : z => ({ z }) //// [file.js] -x ? function (y) { return ({ y: y }); } : function (z) { return ({ z: z }); }; +x ? function (y) { return function (_a) { + var y = _a.y; + return ({ z: z }); +}; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression8Js.symbols b/tests/baselines/reference/parserArrowFunctionExpression8Js.symbols index c1480e6a579..09684043a2b 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8Js.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression8Js.symbols @@ -2,6 +2,6 @@ x ? y => ({ y }) : z => ({ z }) >y : Symbol(y, Decl(file.js, 0, 3)) >y : Symbol(y, Decl(file.js, 0, 11)) ->z : Symbol(z, Decl(file.js, 0, 18)) +>z : Symbol(z) >z : Symbol(z, Decl(file.js, 0, 26)) diff --git a/tests/baselines/reference/parserArrowFunctionExpression8Js.types b/tests/baselines/reference/parserArrowFunctionExpression8Js.types index 7ebfe1aa74a..392a558c184 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8Js.types +++ b/tests/baselines/reference/parserArrowFunctionExpression8Js.types @@ -1,15 +1,14 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js === x ? y => ({ y }) : z => ({ z }) ->x ? y => ({ y }) : z => ({ z }) : ((y: any) => { y: any; }) | ((z: any) => { z: any; }) +>x ? y => ({ y }) : z => ({ z }) : any >x : any ->y => ({ y }) : (y: any) => { y: any; } +>y => ({ y }) : z => ({ z }) : (y: any) => ({ y }: { y: any; }) => z >y : any ->({ y }) : { y: any; } ->{ y } : { y: any; } +>({ y }) : z => ({ z }) : ({ y }: { y: any; }) => z >y : any ->z => ({ z }) : (z: any) => { z: any; } ->z : any >({ z }) : { z: any; } >{ z } : { z: any; } >z : any +> : any + diff --git a/tests/baselines/reference/parserArrowFunctionExpression9.errors.txt b/tests/baselines/reference/parserArrowFunctionExpression9.errors.txt index f779f2105a2..9b36e3d364a 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression9.errors.txt +++ b/tests/baselines/reference/parserArrowFunctionExpression9.errors.txt @@ -1,14 +1,17 @@ tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,1): error TS2304: Cannot find name 'b'. -tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,6): error TS2304: Cannot find name 'c'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,11): error TS2304: Cannot find name 'd'. tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,16): error TS2304: Cannot find name 'e'. +tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(2,1): error TS1005: ':' expected. -==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts (4 errors) ==== b ? (c) : d => e ~ !!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS2304: Cannot find name 'c'. + ~ +!!! error TS2304: Cannot find name 'd'. ~ !!! error TS2304: Cannot find name 'e'. - \ No newline at end of file + + +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserArrowFunctionExpression9.js b/tests/baselines/reference/parserArrowFunctionExpression9.js index ee3bab86c58..43143882395 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression9.js +++ b/tests/baselines/reference/parserArrowFunctionExpression9.js @@ -3,4 +3,6 @@ b ? (c) : d => e //// [parserArrowFunctionExpression9.js] -b ? (c) : function (d) { return e; }; +b ? function (c) { return e; } + : +; diff --git a/tests/baselines/reference/parserArrowFunctionExpression9.symbols b/tests/baselines/reference/parserArrowFunctionExpression9.symbols index dedb9c1e3a1..8b6cf75c11a 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression9.symbols +++ b/tests/baselines/reference/parserArrowFunctionExpression9.symbols @@ -1,4 +1,5 @@ === tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts === b ? (c) : d => e ->d : Symbol(d, Decl(parserArrowFunctionExpression9.ts, 0, 9)) +>c : Symbol(c, Decl(parserArrowFunctionExpression9.ts, 0, 5)) +>d : Symbol(d) diff --git a/tests/baselines/reference/parserArrowFunctionExpression9.types b/tests/baselines/reference/parserArrowFunctionExpression9.types index e97b04eb48a..e11b2e222f3 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression9.types +++ b/tests/baselines/reference/parserArrowFunctionExpression9.types @@ -2,9 +2,9 @@ b ? (c) : d => e >b ? (c) : d => e : any >b : any ->(c) : any +>(c) : d => e : (c: any) => d >c : any ->d => e : (d: any) => any ->d : any >e : any +> : any + diff --git a/tests/baselines/reference/plainJSGrammarErrors.errors.txt b/tests/baselines/reference/plainJSGrammarErrors.errors.txt index c49f7618bf4..0ab5b17e0c2 100644 --- a/tests/baselines/reference/plainJSGrammarErrors.errors.txt +++ b/tests/baselines/reference/plainJSGrammarErrors.errors.txt @@ -100,10 +100,9 @@ tests/cases/conformance/salsa/plainJSGrammarErrors.js(202,22): error TS17012: 't tests/cases/conformance/salsa/plainJSGrammarErrors.js(203,30): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments tests/cases/conformance/salsa/plainJSGrammarErrors.js(204,30): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments tests/cases/conformance/salsa/plainJSGrammarErrors.js(205,36): error TS1325: Argument of dynamic import cannot be spread element. -tests/cases/conformance/salsa/plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be used within a function body. -==== tests/cases/conformance/salsa/plainJSGrammarErrors.js (103 errors) ==== +==== tests/cases/conformance/salsa/plainJSGrammarErrors.js (102 errors) ==== class C { // #private mistakes q = #unbound @@ -515,6 +514,4 @@ tests/cases/conformance/salsa/plainJSGrammarErrors.js(207,1): error TS1108: A 'r !!! error TS1325: Argument of dynamic import cannot be spread element. return - ~~~~~~ -!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/plainJSGrammarErrors.symbols b/tests/baselines/reference/plainJSGrammarErrors.symbols index cc3420d34f9..340f1bc2a82 100644 --- a/tests/baselines/reference/plainJSGrammarErrors.symbols +++ b/tests/baselines/reference/plainJSGrammarErrors.symbols @@ -455,7 +455,6 @@ export let noMeta = import.metal function foo() { new.targe } >foo : Symbol(foo, Decl(plainJSGrammarErrors.js, 200, 32)) >new.targe : Symbol(foo, Decl(plainJSGrammarErrors.js, 200, 32)) ->targe : Symbol(foo, Decl(plainJSGrammarErrors.js, 200, 32)) const nullaryDynamicImport = import() >nullaryDynamicImport : Symbol(nullaryDynamicImport, Decl(plainJSGrammarErrors.js, 202, 5)) diff --git a/tests/baselines/reference/privateNameInTypeQuery.errors.txt b/tests/baselines/reference/privateNameInTypeQuery.errors.txt deleted file mode 100644 index c11a9db934a..00000000000 --- a/tests/baselines/reference/privateNameInTypeQuery.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts(6,15): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts(11,19): error TS18013: Property '#a' is not accessible outside class 'C' because it has a private identifier. - - -==== tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts (2 errors) ==== - class C { - #a = 'a'; - - constructor() { - const a: typeof this.#a = ''; // Ok - const b: typeof this.#a = 1; // Error - ~ -!!! error TS2322: Type 'number' is not assignable to type 'string'. - } - } - - const c = new C(); - const a: typeof c.#a = ''; - ~~ -!!! error TS18013: Property '#a' is not accessible outside class 'C' because it has a private identifier. - \ No newline at end of file diff --git a/tests/baselines/reference/privateNameInTypeQuery.js b/tests/baselines/reference/privateNameInTypeQuery.js deleted file mode 100644 index 4f8e7cb38e1..00000000000 --- a/tests/baselines/reference/privateNameInTypeQuery.js +++ /dev/null @@ -1,25 +0,0 @@ -//// [privateNameInTypeQuery.ts] -class C { - #a = 'a'; - - constructor() { - const a: typeof this.#a = ''; // Ok - const b: typeof this.#a = 1; // Error - } -} - -const c = new C(); -const a: typeof c.#a = ''; - - -//// [privateNameInTypeQuery.js] -"use strict"; -class C { - #a = 'a'; - constructor() { - const a = ''; // Ok - const b = 1; // Error - } -} -const c = new C(); -const a = ''; diff --git a/tests/baselines/reference/privateNameInTypeQuery.symbols b/tests/baselines/reference/privateNameInTypeQuery.symbols deleted file mode 100644 index 1d32e5aab73..00000000000 --- a/tests/baselines/reference/privateNameInTypeQuery.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts === -class C { ->C : Symbol(C, Decl(privateNameInTypeQuery.ts, 0, 0)) - - #a = 'a'; ->#a : Symbol(C.#a, Decl(privateNameInTypeQuery.ts, 0, 9)) - - constructor() { - const a: typeof this.#a = ''; // Ok ->a : Symbol(a, Decl(privateNameInTypeQuery.ts, 4, 13)) ->this.#a : Symbol(C.#a, Decl(privateNameInTypeQuery.ts, 0, 9)) ->this : Symbol(C, Decl(privateNameInTypeQuery.ts, 0, 0)) - - const b: typeof this.#a = 1; // Error ->b : Symbol(b, Decl(privateNameInTypeQuery.ts, 5, 13)) ->this.#a : Symbol(C.#a, Decl(privateNameInTypeQuery.ts, 0, 9)) ->this : Symbol(C, Decl(privateNameInTypeQuery.ts, 0, 0)) - } -} - -const c = new C(); ->c : Symbol(c, Decl(privateNameInTypeQuery.ts, 9, 5)) ->C : Symbol(C, Decl(privateNameInTypeQuery.ts, 0, 0)) - -const a: typeof c.#a = ''; ->a : Symbol(a, Decl(privateNameInTypeQuery.ts, 10, 5)) ->c : Symbol(c, Decl(privateNameInTypeQuery.ts, 9, 5)) - diff --git a/tests/baselines/reference/privateNameInTypeQuery.types b/tests/baselines/reference/privateNameInTypeQuery.types deleted file mode 100644 index 22e34ba59b0..00000000000 --- a/tests/baselines/reference/privateNameInTypeQuery.types +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts === -class C { ->C : C - - #a = 'a'; ->#a : string ->'a' : "a" - - constructor() { - const a: typeof this.#a = ''; // Ok ->a : string ->this.#a : string ->this : this ->'' : "" - - const b: typeof this.#a = 1; // Error ->b : string ->this.#a : string ->this : this ->1 : 1 - } -} - -const c = new C(); ->c : C ->new C() : C ->C : typeof C - -const a: typeof c.#a = ''; ->a : any ->c.#a : any ->c : C ->'' : "" - diff --git a/tests/baselines/reference/reExportJsFromTs.js b/tests/baselines/reference/reExportJsFromTs.js new file mode 100644 index 00000000000..6879d65e0b9 --- /dev/null +++ b/tests/baselines/reference/reExportJsFromTs.js @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/salsa/reExportJsFromTs.ts] //// + +//// [constants.js] +module.exports = { + str: 'x', +}; + +//// [constants.ts] +import * as tsConstants from "../lib/constants"; +export { tsConstants }; + +//// [constants.js] +module.exports = { + str: 'x' +}; +//// [constants.js] +"use strict"; +exports.__esModule = true; +exports.tsConstants = void 0; +var tsConstants = require("../lib/constants"); +exports.tsConstants = tsConstants; diff --git a/tests/baselines/reference/reExportJsFromTs.symbols b/tests/baselines/reference/reExportJsFromTs.symbols new file mode 100644 index 00000000000..eddddb5aed5 --- /dev/null +++ b/tests/baselines/reference/reExportJsFromTs.symbols @@ -0,0 +1,18 @@ +=== /lib/constants.js === +module.exports = { +>module.exports : Symbol(module.exports, Decl(constants.js, 0, 0)) +>module : Symbol(export=, Decl(constants.js, 0, 0)) +>exports : Symbol(export=, Decl(constants.js, 0, 0)) + + str: 'x', +>str : Symbol(str, Decl(constants.js, 0, 18)) + +}; + +=== /src/constants.ts === +import * as tsConstants from "../lib/constants"; +>tsConstants : Symbol(tsConstants, Decl(constants.ts, 0, 6)) + +export { tsConstants }; +>tsConstants : Symbol(tsConstants, Decl(constants.ts, 1, 8)) + diff --git a/tests/baselines/reference/reExportJsFromTs.types b/tests/baselines/reference/reExportJsFromTs.types new file mode 100644 index 00000000000..130fc00f1ae --- /dev/null +++ b/tests/baselines/reference/reExportJsFromTs.types @@ -0,0 +1,21 @@ +=== /lib/constants.js === +module.exports = { +>module.exports = { str: 'x',} : { str: string; } +>module.exports : { str: string; } +>module : { exports: { str: string; }; } +>exports : { str: string; } +>{ str: 'x',} : { str: string; } + + str: 'x', +>str : string +>'x' : "x" + +}; + +=== /src/constants.ts === +import * as tsConstants from "../lib/constants"; +>tsConstants : { str: string; } + +export { tsConstants }; +>tsConstants : { str: string; } + diff --git a/tests/baselines/reference/referencesToNonPropertyNameStringLiteral.baseline.jsonc b/tests/baselines/reference/referencesToNonPropertyNameStringLiteral.baseline.jsonc new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/tests/baselines/reference/referencesToNonPropertyNameStringLiteral.baseline.jsonc @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/baselines/reference/renameNamedImport.baseline b/tests/baselines/reference/renameNamedImport.baseline new file mode 100644 index 00000000000..02abd21a3c7 --- /dev/null +++ b/tests/baselines/reference/renameNamedImport.baseline @@ -0,0 +1,4 @@ +/*====== /src/index.ts ======*/ + +import { [|RENAME|] } from '../lib/index'; +RENAME; diff --git a/tests/baselines/reference/renameNamespaceImport.baseline b/tests/baselines/reference/renameNamespaceImport.baseline new file mode 100644 index 00000000000..7ebef850ab5 --- /dev/null +++ b/tests/baselines/reference/renameNamespaceImport.baseline @@ -0,0 +1,4 @@ +/*====== /src/index.ts ======*/ + +import * as [|RENAME|] from '../lib/index'; +RENAME.someExportedVariable; diff --git a/tests/baselines/reference/templateLiteralTypes1.errors.txt b/tests/baselines/reference/templateLiteralTypes1.errors.txt index e586a1678eb..384125f3380 100644 --- a/tests/baselines/reference/templateLiteralTypes1.errors.txt +++ b/tests/baselines/reference/templateLiteralTypes1.errors.txt @@ -6,7 +6,7 @@ tests/cases/conformance/types/literal/templateLiteralTypes1.ts(165,15): error TS tests/cases/conformance/types/literal/templateLiteralTypes1.ts(197,16): error TS2590: Expression produces a union type that is too complex to represent. tests/cases/conformance/types/literal/templateLiteralTypes1.ts(201,16): error TS2590: Expression produces a union type that is too complex to represent. tests/cases/conformance/types/literal/templateLiteralTypes1.ts(205,16): error TS2590: Expression produces a union type that is too complex to represent. -tests/cases/conformance/types/literal/templateLiteralTypes1.ts(251,7): error TS2590: Expression produces a union type that is too complex to represent. +tests/cases/conformance/types/literal/templateLiteralTypes1.ts(252,7): error TS2590: Expression produces a union type that is too complex to represent. ==== tests/cases/conformance/types/literal/templateLiteralTypes1.ts (7 errors) ==== @@ -242,6 +242,7 @@ tests/cases/conformance/types/literal/templateLiteralTypes1.ts(251,7): error TS2 // Repro from #40970 type PathKeys = + unknown extends T ? never : T extends readonly any[] ? Extract | SubKeys> : T extends object ? Extract | SubKeys> : never; diff --git a/tests/baselines/reference/templateLiteralTypes1.js b/tests/baselines/reference/templateLiteralTypes1.js index d212909fd7d..afa410f6dc9 100644 --- a/tests/baselines/reference/templateLiteralTypes1.js +++ b/tests/baselines/reference/templateLiteralTypes1.js @@ -217,6 +217,7 @@ type BB = AA<-2, -2>; // Repro from #40970 type PathKeys = + unknown extends T ? never : T extends readonly any[] ? Extract | SubKeys> : T extends object ? Extract | SubKeys> : never; diff --git a/tests/baselines/reference/templateLiteralTypes1.symbols b/tests/baselines/reference/templateLiteralTypes1.symbols index 8f539fe347e..fda962de761 100644 --- a/tests/baselines/reference/templateLiteralTypes1.symbols +++ b/tests/baselines/reference/templateLiteralTypes1.symbols @@ -878,11 +878,14 @@ type PathKeys = >PathKeys : Symbol(PathKeys, Decl(templateLiteralTypes1.ts, 213, 21)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) + unknown extends T ? never : +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) + T extends readonly any[] ? Extract | SubKeys> : >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) ->SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 220, 10)) +>SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 221, 10)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) @@ -891,7 +894,7 @@ type PathKeys = >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) ->SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 220, 10)) +>SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 221, 10)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(templateLiteralTypes1.ts, 217, 14)) @@ -899,63 +902,63 @@ type PathKeys = never; type SubKeys = K extends keyof T ? `${K}.${PathKeys}` : never; ->SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 220, 10)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 222, 13)) ->K : Symbol(K, Decl(templateLiteralTypes1.ts, 222, 15)) ->K : Symbol(K, Decl(templateLiteralTypes1.ts, 222, 15)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 222, 13)) ->K : Symbol(K, Decl(templateLiteralTypes1.ts, 222, 15)) +>SubKeys : Symbol(SubKeys, Decl(templateLiteralTypes1.ts, 221, 10)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 223, 13)) +>K : Symbol(K, Decl(templateLiteralTypes1.ts, 223, 15)) +>K : Symbol(K, Decl(templateLiteralTypes1.ts, 223, 15)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 223, 13)) +>K : Symbol(K, Decl(templateLiteralTypes1.ts, 223, 15)) >PathKeys : Symbol(PathKeys, Decl(templateLiteralTypes1.ts, 213, 21)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 222, 13)) ->K : Symbol(K, Decl(templateLiteralTypes1.ts, 222, 15)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 223, 13)) +>K : Symbol(K, Decl(templateLiteralTypes1.ts, 223, 15)) declare function getProp2>(obj: T, path: P): PropType; ->getProp2 : Symbol(getProp2, Decl(templateLiteralTypes1.ts, 222, 89)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 224, 26)) ->P : Symbol(P, Decl(templateLiteralTypes1.ts, 224, 28)) +>getProp2 : Symbol(getProp2, Decl(templateLiteralTypes1.ts, 223, 89)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 225, 26)) +>P : Symbol(P, Decl(templateLiteralTypes1.ts, 225, 28)) >PathKeys : Symbol(PathKeys, Decl(templateLiteralTypes1.ts, 213, 21)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 224, 26)) ->obj : Symbol(obj, Decl(templateLiteralTypes1.ts, 224, 52)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 224, 26)) ->path : Symbol(path, Decl(templateLiteralTypes1.ts, 224, 59)) ->P : Symbol(P, Decl(templateLiteralTypes1.ts, 224, 28)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 225, 26)) +>obj : Symbol(obj, Decl(templateLiteralTypes1.ts, 225, 52)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 225, 26)) +>path : Symbol(path, Decl(templateLiteralTypes1.ts, 225, 59)) +>P : Symbol(P, Decl(templateLiteralTypes1.ts, 225, 28)) >PropType : Symbol(PropType, Decl(templateLiteralTypes1.ts, 138, 69)) ->T : Symbol(T, Decl(templateLiteralTypes1.ts, 224, 26)) ->P : Symbol(P, Decl(templateLiteralTypes1.ts, 224, 28)) +>T : Symbol(T, Decl(templateLiteralTypes1.ts, 225, 26)) +>P : Symbol(P, Decl(templateLiteralTypes1.ts, 225, 28)) const obj2 = { ->obj2 : Symbol(obj2, Decl(templateLiteralTypes1.ts, 226, 5)) +>obj2 : Symbol(obj2, Decl(templateLiteralTypes1.ts, 227, 5)) name: 'John', ->name : Symbol(name, Decl(templateLiteralTypes1.ts, 226, 14)) +>name : Symbol(name, Decl(templateLiteralTypes1.ts, 227, 14)) age: 42, ->age : Symbol(age, Decl(templateLiteralTypes1.ts, 227, 17)) +>age : Symbol(age, Decl(templateLiteralTypes1.ts, 228, 17)) cars: [ ->cars : Symbol(cars, Decl(templateLiteralTypes1.ts, 228, 12)) +>cars : Symbol(cars, Decl(templateLiteralTypes1.ts, 229, 12)) { make: 'Ford', age: 10 }, ->make : Symbol(make, Decl(templateLiteralTypes1.ts, 230, 9)) ->age : Symbol(age, Decl(templateLiteralTypes1.ts, 230, 23)) +>make : Symbol(make, Decl(templateLiteralTypes1.ts, 231, 9)) +>age : Symbol(age, Decl(templateLiteralTypes1.ts, 231, 23)) { make: 'Trabant', age: 35 } ->make : Symbol(make, Decl(templateLiteralTypes1.ts, 231, 9)) ->age : Symbol(age, Decl(templateLiteralTypes1.ts, 231, 26)) +>make : Symbol(make, Decl(templateLiteralTypes1.ts, 232, 9)) +>age : Symbol(age, Decl(templateLiteralTypes1.ts, 232, 26)) ] } as const; >const : Symbol(const) let make = getProp2(obj2, 'cars.1.make'); // 'Trabant' ->make : Symbol(make, Decl(templateLiteralTypes1.ts, 235, 3)) ->getProp2 : Symbol(getProp2, Decl(templateLiteralTypes1.ts, 222, 89)) ->obj2 : Symbol(obj2, Decl(templateLiteralTypes1.ts, 226, 5)) +>make : Symbol(make, Decl(templateLiteralTypes1.ts, 236, 3)) +>getProp2 : Symbol(getProp2, Decl(templateLiteralTypes1.ts, 223, 89)) +>obj2 : Symbol(obj2, Decl(templateLiteralTypes1.ts, 227, 5)) // Repro from #46480 export type Spacing = ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) | `0` | `${number}px` @@ -963,28 +966,28 @@ export type Spacing = | `s${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20}`; const spacing: Spacing = "s12" ->spacing : Symbol(spacing, Decl(templateLiteralTypes1.ts, 245, 5)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) +>spacing : Symbol(spacing, Decl(templateLiteralTypes1.ts, 246, 5)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) export type SpacingShorthand = ->SpacingShorthand : Symbol(SpacingShorthand, Decl(templateLiteralTypes1.ts, 245, 30)) +>SpacingShorthand : Symbol(SpacingShorthand, Decl(templateLiteralTypes1.ts, 246, 30)) | `${Spacing} ${Spacing}` ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) | `${Spacing} ${Spacing} ${Spacing}` ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) | `${Spacing} ${Spacing} ${Spacing} ${Spacing}`; ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) ->Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 235, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) +>Spacing : Symbol(Spacing, Decl(templateLiteralTypes1.ts, 236, 41)) const test1: SpacingShorthand = "0 0 0"; ->test1 : Symbol(test1, Decl(templateLiteralTypes1.ts, 252, 5)) ->SpacingShorthand : Symbol(SpacingShorthand, Decl(templateLiteralTypes1.ts, 245, 30)) +>test1 : Symbol(test1, Decl(templateLiteralTypes1.ts, 253, 5)) +>SpacingShorthand : Symbol(SpacingShorthand, Decl(templateLiteralTypes1.ts, 246, 30)) diff --git a/tests/baselines/reference/templateLiteralTypes1.types b/tests/baselines/reference/templateLiteralTypes1.types index fed8939ea76..42036b95f49 100644 --- a/tests/baselines/reference/templateLiteralTypes1.types +++ b/tests/baselines/reference/templateLiteralTypes1.types @@ -541,6 +541,7 @@ type BB = AA<-2, -2>; type PathKeys = >PathKeys : PathKeys + unknown extends T ? never : T extends readonly any[] ? Extract | SubKeys> : T extends object ? Extract | SubKeys> : never; diff --git a/tests/baselines/reference/topLevelAwait.1(module=es2022,target=es2015).errors.txt b/tests/baselines/reference/topLevelAwait.1(module=es2022,target=es2015).errors.txt index 1c56871bbd5..b272ba8a8c6 100644 --- a/tests/baselines/reference/topLevelAwait.1(module=es2022,target=es2015).errors.txt +++ b/tests/baselines/reference/topLevelAwait.1(module=es2022,target=es2015).errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/externalModules/index.ts (2 errors) ==== export const x = 1; await x; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. // reparse element access as await await [x]; @@ -53,7 +53,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' declare const dec: any; @(await dec) ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. class C { } @@ -84,7 +84,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' for await (const item of arr) { ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. item; } \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.1(module=esnext,target=es2015).errors.txt b/tests/baselines/reference/topLevelAwait.1(module=esnext,target=es2015).errors.txt index 1c56871bbd5..b272ba8a8c6 100644 --- a/tests/baselines/reference/topLevelAwait.1(module=esnext,target=es2015).errors.txt +++ b/tests/baselines/reference/topLevelAwait.1(module=esnext,target=es2015).errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/externalModules/index.ts (2 errors) ==== export const x = 1; await x; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. // reparse element access as await await [x]; @@ -53,7 +53,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' declare const dec: any; @(await dec) ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. class C { } @@ -84,7 +84,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' for await (const item of arr) { ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. item; } \ No newline at end of file diff --git a/tests/baselines/reference/topLevelAwait.1(module=system,target=es2015).errors.txt b/tests/baselines/reference/topLevelAwait.1(module=system,target=es2015).errors.txt index 1c56871bbd5..b272ba8a8c6 100644 --- a/tests/baselines/reference/topLevelAwait.1(module=system,target=es2015).errors.txt +++ b/tests/baselines/reference/topLevelAwait.1(module=system,target=es2015).errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/index.ts(46,3): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. ==== tests/cases/conformance/externalModules/index.ts (2 errors) ==== export const x = 1; await x; ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. // reparse element access as await await [x]; @@ -53,7 +53,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' declare const dec: any; @(await dec) ~~~~~ -!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. class C { } @@ -84,7 +84,7 @@ tests/cases/conformance/externalModules/other.ts(9,5): error TS1432: Top-level ' for await (const item of arr) { ~~~~~ -!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. item; } \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt index 0fecbd4a916..d00a14233de 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.oldTranspile.errors.txt index 0fecbd4a916..d00a14233de 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.oldTranspile.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.oldTranspile.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt index 0fecbd4a916..d00a14233de 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.oldTranspile.errors.txt index 0fecbd4a916..d00a14233de 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.oldTranspile.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.oldTranspile.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node12', 'nodenext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).errors.txt b/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).errors.txt similarity index 100% rename from tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).errors.txt rename to tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).errors.txt diff --git a/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).js b/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).js similarity index 100% rename from tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).js rename to tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).js diff --git a/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).symbols b/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).symbols similarity index 100% rename from tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).symbols rename to tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).symbols diff --git a/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).types b/tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).types similarity index 100% rename from tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node12).types rename to tests/baselines/reference/tripleSlashTypesReferenceWithMissingExports(module=node16).types diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js index f1975b6c48b..167a38161a5 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js @@ -69,17 +69,17 @@ const globalConst = 10; Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:07 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:08 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:16 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:17 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -936,19 +936,19 @@ export const x = 10;console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:30 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:31 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:32 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:40 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:41 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:46 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-emitHelpers-in-all-projects.js index 998937747e5..59c02c18307 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-emitHelpers-in-all-projects.js @@ -81,17 +81,17 @@ const globalConst = 10; Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:12 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:13 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:14 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:22 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:23 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2113,19 +2113,19 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:36 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:37 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:38 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:46 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:47 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:52 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -3730,19 +3730,19 @@ export const x = 10;function forlibfile1Rest() { }console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:07:00 AM] Projects in this build: +[12:01:01 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:07:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:01:02 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:07:00 AM] Building project '/src/lib/tsconfig.json'... +[12:01:03 AM] Building project '/src/lib/tsconfig.json'... -[12:07:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:01:11 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:07:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:01:12 AM] Updating output of project '/src/app/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:01:17 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-prologues-in-all-projects.js index bd0d249a912..517343f4ad7 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/multiple-prologues-in-all-projects.js @@ -74,17 +74,17 @@ const globalConst = 10; Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:13 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:14 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:15 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:23 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:24 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1222,19 +1222,19 @@ export const x = 10;console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:37 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:38 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:39 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:47 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:48 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:53 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2111,19 +2111,19 @@ export const x = 10;console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:07:00 AM] Projects in this build: +[12:01:02 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:07:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:01:03 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:07:00 AM] Building project '/src/lib/tsconfig.json'... +[12:01:04 AM] Building project '/src/lib/tsconfig.json'... -[12:07:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:01:12 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:07:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:01:13 AM] Updating output of project '/src/app/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:01:19 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/shebang-in-all-projects.js index db0ff719b66..d6dc16faeba 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/shebang-in-all-projects.js @@ -72,17 +72,17 @@ const globalConst = 10; Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:10 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:11 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:19 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:20 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -958,19 +958,19 @@ export const x = 10;console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:33 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:34 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:35 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:43 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:44 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:49 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/stripInternal.js index 9497ab0218c..01d26503916 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/stripInternal.js @@ -95,17 +95,17 @@ const globalConst = 10; Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:10 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:11 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:19 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:20 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -4863,19 +4863,19 @@ export namespace normalN { Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:33 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:34 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:35 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:43 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:44 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:49 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -8671,17 +8671,17 @@ export namespace normalN { Output:: /lib/tsc --b /src/app --verbose -[12:07:00 AM] Projects in this build: +[12:00:58 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:07:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:59 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:07:00 AM] Building project '/src/lib/tsconfig.json'... +[12:01:00 AM] Building project '/src/lib/tsconfig.json'... -[12:07:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:01:08 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:07:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:01:09 AM] Updating output of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/triple-slash-refs-in-all-projects.js index 3ad0c88e81d..03189af6066 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/triple-slash-refs-in-all-projects.js @@ -79,17 +79,17 @@ declare class libfile0 { } Output:: /lib/tsc --b /src/app --verbose -[12:01:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:01:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist +[12:00:11 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist -[12:01:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:12 AM] Building project '/src/lib/tsconfig.json'... -[12:01:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:20 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:01:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:21 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1171,19 +1171,19 @@ export const x = 10;console.log(x); Output:: /lib/tsc --b /src/app --verbose -[12:04:00 AM] Projects in this build: +[12:00:34 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:04:00 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' +[12:00:35 AM] Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' -[12:04:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:36 AM] Building project '/src/lib/tsconfig.json'... -[12:04:00 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed +[12:00:44 AM] Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed -[12:04:00 AM] Updating output of project '/src/app/tsconfig.json'... +[12:00:45 AM] Updating output of project '/src/app/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... +[12:00:50 AM] Updating unchanged output timestamps of project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js index babc7d70a35..d77d1678ae8 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js @@ -69,17 +69,17 @@ const globalConst = 10; Output:: /lib/tsc -b /src/app --verbose -[12:00:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/lib/tsconfig.json * src/app/tsconfig.json -[12:00:00 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/module.js' does not exist +[12:00:09 AM] Project 'src/lib/tsconfig.json' is out of date because output file 'src/module.js' does not exist -[12:00:00 AM] Building project '/src/lib/tsconfig.json'... +[12:00:10 AM] Building project '/src/lib/tsconfig.json'... -[12:00:00 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist +[12:00:18 AM] Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist -[12:00:00 AM] Building project '/src/app/tsconfig.json'... +[12:00:19 AM] Building project '/src/app/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js b/tests/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js index e8cecc75d8c..88b1765793d 100644 --- a/tests/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js +++ b/tests/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/bar.ts] diff --git a/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js index 54ef6410912..9486e97e751 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js @@ -160,7 +160,7 @@ exports.bar = bar; //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"9819159940-export function foo() { }export function fooBar() { }","1045484683-export function bar() { }"],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"9819159940-export function foo() { }export function fooBar() { }","signature":"-827728784-export declare function foo(): void;\r\nexport declare function fooBar(): void;\r\n"},{"version":"1045484683-export function bar() { }","signature":"-1357953631-export declare function bar(): void;\r\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -178,11 +178,11 @@ exports.bar = bar; }, "./a.ts": { "version": "9819159940-export function foo() { }export function fooBar() { }", - "signature": "9819159940-export function foo() { }export function fooBar() { }" + "signature": "-827728784-export declare function foo(): void;\r\nexport declare function fooBar(): void;\r\n" }, "./b.ts": { "version": "1045484683-export function bar() { }", - "signature": "1045484683-export function bar() { }" + "signature": "-1357953631-export declare function bar(): void;\r\n" } }, "options": { @@ -198,6 +198,6 @@ exports.bar = bar; ] }, "version": "FakeTSVersion", - "size": 816 + "size": 1016 } diff --git a/tests/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js b/tests/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js index b948e6af201..6671142bb0b 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/tsconfig.first.json] { diff --git a/tests/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js b/tests/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js index 8447b9058d9..59c5133c2de 100644 --- a/tests/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js +++ b/tests/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js @@ -27,7 +27,7 @@ export const a: Unrestricted = 1; type Unrestricted = any; //// [/src/tsconfig.json] - +{"references":[{"path":"./shared/tsconfig.json"},{"path":"./webpack/tsconfig.json"}],"files":[]} //// [/src/webpack/index.ts] export const b: Unrestricted = 1; @@ -39,20 +39,20 @@ export const b: Unrestricted = 1; Output:: /lib/tsc --b /src/webpack/tsconfig.json --v --listFiles -[12:00:00 AM] Projects in this build: +[12:00:16 AM] Projects in this build: * src/shared/tsconfig.json * src/webpack/tsconfig.json -[12:00:00 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/target-tsc-build/shared/index.js' does not exist +[12:00:17 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/target-tsc-build/shared/index.js' does not exist -[12:00:00 AM] Building project '/src/shared/tsconfig.json'... +[12:00:18 AM] Building project '/src/shared/tsconfig.json'... /lib/lib.d.ts /src/shared/index.ts /src/shared/typings-base/globals.d.ts -[12:00:00 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/target-tsc-build/webpack/index.js' does not exist +[12:00:25 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/target-tsc-build/webpack/index.js' does not exist -[12:00:00 AM] Building project '/src/webpack/tsconfig.json'... +[12:00:26 AM] Building project '/src/webpack/tsconfig.json'... /lib/lib.d.ts /src/webpack/index.ts @@ -72,7 +72,7 @@ exports.a = 1; //// [/src/target-tsc-build/shared/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-22125360210-export const a: Unrestricted = 1;",{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-22125360210-export const a: Unrestricted = 1;","signature":"-478734393-export declare const a: Unrestricted;\r\n"},{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/target-tsc-build/shared/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -90,7 +90,7 @@ exports.a = 1; }, "../../shared/index.ts": { "version": "-22125360210-export const a: Unrestricted = 1;", - "signature": "-22125360210-export const a: Unrestricted = 1;" + "signature": "-478734393-export declare const a: Unrestricted;\r\n" }, "../../shared/typings-base/globals.d.ts": { "version": "4725476611-type Unrestricted = any;", @@ -112,7 +112,7 @@ exports.a = 1; ] }, "version": "FakeTSVersion", - "size": 901 + "size": 980 } //// [/src/target-tsc-build/webpack/index.d.ts] @@ -127,7 +127,7 @@ exports.b = 1; //// [/src/target-tsc-build/webpack/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14405273073-export const b: Unrestricted = 1;",{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14405273073-export const b: Unrestricted = 1;","signature":"-5074241048-export declare const b: Unrestricted;\r\n"},{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/target-tsc-build/webpack/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -145,7 +145,7 @@ exports.b = 1; }, "../../webpack/index.ts": { "version": "-14405273073-export const b: Unrestricted = 1;", - "signature": "-14405273073-export const b: Unrestricted = 1;" + "signature": "-5074241048-export declare const b: Unrestricted;\r\n" }, "../../shared/typings-base/globals.d.ts": { "version": "4725476611-type Unrestricted = any;", @@ -167,6 +167,6 @@ exports.b = 1; ] }, "version": "FakeTSVersion", - "size": 902 + "size": 982 } diff --git a/tests/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js b/tests/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js index d68345571e2..80699604c08 100644 --- a/tests/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js +++ b/tests/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js @@ -39,21 +39,21 @@ export const b: Unrestricted = 1; Output:: /lib/tsc --b /src/tsconfig.json --v --listFiles -[12:00:00 AM] Projects in this build: +[12:00:16 AM] Projects in this build: * src/shared/tsconfig.json * src/webpack/tsconfig.json * src/tsconfig.json -[12:00:00 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/target-tsc-build/shared/index.js' does not exist +[12:00:17 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/target-tsc-build/shared/index.js' does not exist -[12:00:00 AM] Building project '/src/shared/tsconfig.json'... +[12:00:18 AM] Building project '/src/shared/tsconfig.json'... /lib/lib.d.ts /src/shared/index.ts /src/shared/typings-base/globals.d.ts -[12:00:00 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/target-tsc-build/webpack/index.js' does not exist +[12:00:25 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/target-tsc-build/webpack/index.js' does not exist -[12:00:00 AM] Building project '/src/webpack/tsconfig.json'... +[12:00:26 AM] Building project '/src/webpack/tsconfig.json'... /lib/lib.d.ts /src/webpack/index.ts @@ -73,7 +73,7 @@ exports.a = 1; //// [/src/target-tsc-build/shared/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-22125360210-export const a: Unrestricted = 1;",{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-22125360210-export const a: Unrestricted = 1;","signature":"-478734393-export declare const a: Unrestricted;\r\n"},{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/target-tsc-build/shared/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -91,7 +91,7 @@ exports.a = 1; }, "../../shared/index.ts": { "version": "-22125360210-export const a: Unrestricted = 1;", - "signature": "-22125360210-export const a: Unrestricted = 1;" + "signature": "-478734393-export declare const a: Unrestricted;\r\n" }, "../../shared/typings-base/globals.d.ts": { "version": "4725476611-type Unrestricted = any;", @@ -113,7 +113,7 @@ exports.a = 1; ] }, "version": "FakeTSVersion", - "size": 901 + "size": 980 } //// [/src/target-tsc-build/webpack/index.d.ts] @@ -128,7 +128,7 @@ exports.b = 1; //// [/src/target-tsc-build/webpack/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14405273073-export const b: Unrestricted = 1;",{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14405273073-export const b: Unrestricted = 1;","signature":"-5074241048-export declare const b: Unrestricted;\r\n"},{"version":"4725476611-type Unrestricted = any;","affectsGlobalScope":true}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/target-tsc-build/webpack/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -146,7 +146,7 @@ exports.b = 1; }, "../../webpack/index.ts": { "version": "-14405273073-export const b: Unrestricted = 1;", - "signature": "-14405273073-export const b: Unrestricted = 1;" + "signature": "-5074241048-export declare const b: Unrestricted;\r\n" }, "../../shared/typings-base/globals.d.ts": { "version": "4725476611-type Unrestricted = any;", @@ -168,6 +168,6 @@ exports.b = 1; ] }, "version": "FakeTSVersion", - "size": 902 + "size": 982 } diff --git a/tests/baselines/reference/tsbuild/containerOnlyReferenced/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js b/tests/baselines/reference/tsbuild/containerOnlyReferenced/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js index ff5e3de77dd..2ce246e4af5 100644 --- a/tests/baselines/reference/tsbuild/containerOnlyReferenced/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js +++ b/tests/baselines/reference/tsbuild/containerOnlyReferenced/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js @@ -78,24 +78,24 @@ export const x = 10; Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/src/folder/tsconfig.json * src/src/folder2/tsconfig.json * src/src/tsconfig.json * src/tests/tsconfig.json * src/tsconfig.json -[12:01:00 AM] Project 'src/src/folder/tsconfig.json' is out of date because output file 'src/src/folder/index.js' does not exist +[12:00:07 AM] Project 'src/src/folder/tsconfig.json' is out of date because output file 'src/src/folder/index.js' does not exist -[12:01:00 AM] Building project '/src/src/folder/tsconfig.json'... +[12:00:08 AM] Building project '/src/src/folder/tsconfig.json'... -[12:01:00 AM] Project 'src/src/folder2/tsconfig.json' is out of date because output file 'src/src/folder2/index.js' does not exist +[12:00:13 AM] Project 'src/src/folder2/tsconfig.json' is out of date because output file 'src/src/folder2/index.js' does not exist -[12:01:00 AM] Building project '/src/src/folder2/tsconfig.json'... +[12:00:14 AM] Building project '/src/src/folder2/tsconfig.json'... -[12:01:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:19 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:01:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:20 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -112,7 +112,7 @@ exports.x = 10; //// [/src/src/folder/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/src/folder/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -129,7 +129,7 @@ exports.x = 10; }, "./index.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6057683066-export declare const x = 10;\r\n" } }, "options": { @@ -143,7 +143,7 @@ exports.x = 10; ] }, "version": "FakeTSVersion", - "size": 726 + "size": 797 } //// [/src/src/folder2/index.d.ts] @@ -158,7 +158,7 @@ exports.x = 10; //// [/src/src/folder2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/src/folder2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -175,7 +175,7 @@ exports.x = 10; }, "./index.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6057683066-export declare const x = 10;\r\n" } }, "options": { @@ -189,7 +189,7 @@ exports.x = 10; ] }, "version": "FakeTSVersion", - "size": 726 + "size": 797 } //// [/src/tests/index.d.ts] @@ -204,7 +204,7 @@ exports.x = 10; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -221,7 +221,7 @@ exports.x = 10; }, "./index.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6057683066-export declare const x = 10;\r\n" } }, "options": { @@ -235,7 +235,7 @@ exports.x = 10; ] }, "version": "FakeTSVersion", - "size": 723 + "size": 794 } @@ -246,18 +246,18 @@ Input:: Output:: /lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: +[12:00:25 AM] Projects in this build: * src/src/folder/tsconfig.json * src/src/folder2/tsconfig.json * src/src/tsconfig.json * src/tests/tsconfig.json * src/tsconfig.json -[12:04:00 AM] Project 'src/src/folder/tsconfig.json' is up to date because newest input 'src/src/folder/index.ts' is older than oldest output 'src/src/folder/index.js' +[12:00:26 AM] Project 'src/src/folder/tsconfig.json' is up to date because newest input 'src/src/folder/index.ts' is older than oldest output 'src/src/folder/index.js' -[12:04:00 AM] Project 'src/src/folder2/tsconfig.json' is up to date because newest input 'src/src/folder2/index.ts' is older than oldest output 'src/src/folder2/index.js' +[12:00:27 AM] Project 'src/src/folder2/tsconfig.json' is up to date because newest input 'src/src/folder2/index.ts' is older than oldest output 'src/src/folder2/index.js' -[12:04:00 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' +[12:00:28 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js index c89cb485b86..a0ea8ab754c 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js @@ -19,7 +19,7 @@ declare const console: { log(msg: any): void; }; export declare type Nominal = MyNominal; //// [/src/solution/src/common/tsconfig.json] - +{"extends":"../../tsconfig.base.json","compilerOptions":{"composite":true},"include":["./nominal.ts"]} //// [/src/solution/src/common/types.d.ts] declare type MyNominal = T & { @@ -31,7 +31,7 @@ import { Nominal } from '../common/nominal'; export type MyNominal = Nominal; //// [/src/solution/src/subProject/tsconfig.json] - +{"extends":"../../tsconfig.base.json","compilerOptions":{"composite":true},"references":[{"path":"../common"}],"include":["./index.ts"]} //// [/src/solution/src/subProject2/index.ts] import { MyNominal } from '../subProject/index'; @@ -43,10 +43,10 @@ export function getVar(): keyof typeof variable { } //// [/src/solution/src/subProject2/tsconfig.json] - +{"extends":"../../tsconfig.base.json","compilerOptions":{"composite":true},"references":[{"path":"../subProject"}],"include":["./index.ts"]} //// [/src/solution/src/tsconfig.json] - +{"compilerOptions":{"composite":true},"references":[{"path":"./subProject"},{"path":"./subProject2"}],"include":[]} //// [/src/solution/tsconfig.base.json] {"compilerOptions":{"rootDir":"./","outDir":"lib"}} @@ -58,12 +58,12 @@ export function getVar(): keyof typeof variable { Output:: /lib/tsc --b /src/solution/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:21 AM] Projects in this build: * src/solution/tsconfig.json -[12:00:00 AM] Project 'src/solution/tsconfig.json' is out of date because output file 'src/solution/lib/src/common/nominal.js' does not exist +[12:00:22 AM] Project 'src/solution/tsconfig.json' is out of date because output file 'src/solution/lib/src/common/nominal.js' does not exist -[12:00:00 AM] Building project '/src/solution/tsconfig.json'... +[12:00:23 AM] Building project '/src/solution/tsconfig.json'... exitCode:: ExitStatus.Success @@ -112,7 +112,7 @@ exports.getVar = getVar; //// [/src/solution/lib/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../src/common/types.d.ts","../src/common/nominal.ts","../src/subproject/index.ts","../src/subproject2/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"4107369137-/// \nexport declare type Nominal = MyNominal;","-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;","2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}"],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[2],[3],[4]],"referencedMap":[[3,1],[4,2],[5,3]],"exportedModulesMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../src/common/types.d.ts","../src/common/nominal.ts","../src/subproject/index.ts","../src/subproject2/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},{"version":"4107369137-/// \nexport declare type Nominal = MyNominal;","signature":"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n"},{"version":"-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;","signature":"-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n"},{"version":"2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}","signature":"-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n"}],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[2],[3],[4]],"referencedMap":[[3,1],[4,2],[5,3]],"exportedModulesMap":[[4,2],[5,3]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/solution/lib/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -148,15 +148,15 @@ exports.getVar = getVar; }, "../src/common/nominal.ts": { "version": "4107369137-/// \nexport declare type Nominal = MyNominal;", - "signature": "4107369137-/// \nexport declare type Nominal = MyNominal;" + "signature": "-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n" }, "../src/subproject/index.ts": { "version": "-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", - "signature": "-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;" + "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" }, "../src/subproject2/index.ts": { "version": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", - "signature": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}" + "signature": "-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" } }, "options": { @@ -176,9 +176,6 @@ exports.getVar = getVar; ] }, "exportedModulesMap": { - "../src/common/nominal.ts": [ - "../src/common/types.d.ts" - ], "../src/subproject/index.ts": [ "../src/common/nominal.ts" ], @@ -195,6 +192,6 @@ exports.getVar = getVar; ] }, "version": "FakeTSVersion", - "size": 1455 + "size": 2003 } diff --git a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js index 60d3869da0b..3de7c42c595 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js @@ -58,24 +58,24 @@ export function getVar(): keyof typeof variable { Output:: /lib/tsc --b /src/solution/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:21 AM] Projects in this build: * src/solution/src/common/tsconfig.json * src/solution/src/subProject/tsconfig.json * src/solution/src/subProject2/tsconfig.json * src/solution/src/tsconfig.json * src/solution/tsconfig.json -[12:00:00 AM] Project 'src/solution/src/common/tsconfig.json' is out of date because output file 'src/solution/lib/src/common/nominal.js' does not exist +[12:00:22 AM] Project 'src/solution/src/common/tsconfig.json' is out of date because output file 'src/solution/lib/src/common/nominal.js' does not exist -[12:00:00 AM] Building project '/src/solution/src/common/tsconfig.json'... +[12:00:23 AM] Building project '/src/solution/src/common/tsconfig.json'... -[12:00:00 AM] Project 'src/solution/src/subProject/tsconfig.json' is out of date because output file 'src/solution/lib/src/subProject/index.js' does not exist +[12:00:31 AM] Project 'src/solution/src/subProject/tsconfig.json' is out of date because output file 'src/solution/lib/src/subProject/index.js' does not exist -[12:00:00 AM] Building project '/src/solution/src/subProject/tsconfig.json'... +[12:00:32 AM] Building project '/src/solution/src/subProject/tsconfig.json'... -[12:00:00 AM] Project 'src/solution/src/subProject2/tsconfig.json' is out of date because output file 'src/solution/lib/src/subProject2/index.js' does not exist +[12:00:38 AM] Project 'src/solution/src/subProject2/tsconfig.json' is out of date because output file 'src/solution/lib/src/subProject2/index.js' does not exist -[12:00:00 AM] Building project '/src/solution/src/subProject2/tsconfig.json'... +[12:00:39 AM] Building project '/src/solution/src/subProject2/tsconfig.json'... exitCode:: ExitStatus.Success @@ -92,7 +92,7 @@ exports.__esModule = true; //// [/src/solution/lib/src/common/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../../../src/common/nominal.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"4107369137-/// \nexport declare type Nominal = MyNominal;"],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../../../src/common/nominal.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},{"version":"4107369137-/// \nexport declare type Nominal = MyNominal;","signature":"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/solution/lib/src/common/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -120,7 +120,7 @@ exports.__esModule = true; }, "../../../src/common/nominal.ts": { "version": "4107369137-/// \nexport declare type Nominal = MyNominal;", - "signature": "4107369137-/// \nexport declare type Nominal = MyNominal;" + "signature": "-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n" } }, "options": { @@ -133,11 +133,7 @@ exports.__esModule = true; "../../../src/common/types.d.ts" ] }, - "exportedModulesMap": { - "../../../src/common/nominal.ts": [ - "../../../src/common/types.d.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../lib/lib.d.ts", "../../../src/common/nominal.ts", @@ -145,7 +141,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 1081 + "size": 1254 } //// [/src/solution/lib/src/subProject/index.d.ts] @@ -159,7 +155,7 @@ exports.__esModule = true; //// [/src/solution/lib/src/subProject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../../../src/subproject/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n","-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;"],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../../../src/subproject/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n",{"version":"-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;","signature":"-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/solution/lib/src/subProject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -195,7 +191,7 @@ exports.__esModule = true; }, "../../../src/subproject/index.ts": { "version": "-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", - "signature": "-25117049605-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;" + "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" } }, "options": { @@ -227,7 +223,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 1267 + "size": 1420 } //// [/src/solution/lib/src/subProject2/index.d.ts] @@ -253,7 +249,7 @@ exports.getVar = getVar; //// [/src/solution/lib/src/subProject2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../subproject/index.d.ts","../../../src/subproject2/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n","-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n","2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}"],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2],[3],[4]],"referencedMap":[[3,1],[4,2],[5,3]],"exportedModulesMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[1,3,4,2,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../subproject/index.d.ts","../../../src/subproject2/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"23815050294-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true},"-18894149496-/// \r\nexport declare type Nominal = MyNominal;\r\n","-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n",{"version":"2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}","signature":"-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"fileIdsList":[[2],[3],[4]],"referencedMap":[[3,1],[4,2],[5,3]],"exportedModulesMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[1,3,4,2,5]},"version":"FakeTSVersion"} //// [/src/solution/lib/src/subProject2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -297,7 +293,7 @@ exports.getVar = getVar; }, "../../../src/subproject2/index.ts": { "version": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", - "signature": "2747033208-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}" + "signature": "-5370006151-import { MyNominal } from '../subProject/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" } }, "options": { @@ -336,6 +332,6 @@ exports.getVar = getVar; ] }, "version": "FakeTSVersion", - "size": 1518 + "size": 1741 } diff --git a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js index 2fe0ce35336..8e9bd8c3463 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js @@ -42,17 +42,17 @@ export function fn4() { Output:: /lib/tsc --b /src/packages/pkg2/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:16 AM] Projects in this build: * src/packages/pkg1/tsconfig.json * src/packages/pkg2/tsconfig.json -[12:00:00 AM] Project 'src/packages/pkg1/tsconfig.json' is out of date because output file 'src/packages/pkg1/lib/src/index.js' does not exist +[12:00:17 AM] Project 'src/packages/pkg1/tsconfig.json' is out of date because output file 'src/packages/pkg1/lib/src/index.js' does not exist -[12:00:00 AM] Building project '/src/packages/pkg1/tsconfig.json'... +[12:00:18 AM] Building project '/src/packages/pkg1/tsconfig.json'... -[12:00:00 AM] Project 'src/packages/pkg2/tsconfig.json' is out of date because output file 'src/packages/pkg2/lib/src/index.js' does not exist +[12:00:25 AM] Project 'src/packages/pkg2/tsconfig.json' is out of date because output file 'src/packages/pkg2/lib/src/index.js' does not exist -[12:00:00 AM] Building project '/src/packages/pkg2/tsconfig.json'... +[12:00:26 AM] Building project '/src/packages/pkg2/tsconfig.json'... exitCode:: ExitStatus.Success @@ -72,7 +72,7 @@ exports.__esModule = true; //// [/src/packages/pkg1/lib/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2072077482-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2072077482-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}","signature":"-5386205042-export interface IThing {\r\n a: string;\r\n}\r\nexport interface IThings {\r\n thing1: IThing;\r\n}\r\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/packages/pkg1/lib/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -89,7 +89,7 @@ exports.__esModule = true; }, "../src/index.ts": { "version": "-2072077482-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}", - "signature": "-2072077482-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}" + "signature": "-5386205042-export interface IThing {\r\n a: string;\r\n}\r\nexport interface IThings {\r\n thing1: IThing;\r\n}\r\n" } }, "options": { @@ -104,7 +104,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 819 + "size": 968 } //// [/src/packages/pkg2/lib/src/index.d.ts] @@ -123,7 +123,7 @@ exports.fn4 = fn4; //// [/src/packages/pkg2/lib/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","../../pkg1/lib/src/index.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5386205042-export interface IThing {\r\n a: string;\r\n}\r\nexport interface IThings {\r\n thing1: IThing;\r\n}\r\n","8515046367-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}"],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","../../pkg1/lib/src/index.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5386205042-export interface IThing {\r\n a: string;\r\n}\r\nexport interface IThings {\r\n thing1: IThing;\r\n}\r\n",{"version":"8515046367-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}","signature":"-9447422063-export declare function fn4(): import(\"@fluentui/pkg1\").IThing;\r\n"}],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/packages/pkg2/lib/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -150,7 +150,7 @@ exports.fn4 = fn4; }, "../src/index.ts": { "version": "8515046367-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}", - "signature": "8515046367-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}" + "signature": "-9447422063-export declare function fn4(): import(\"@fluentui/pkg1\").IThing;\r\n" } }, "options": { @@ -174,6 +174,6 @@ exports.fn4 = fn4; ] }, "version": "FakeTSVersion", - "size": 1050 + "size": 1158 } diff --git a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js index 6b617709cce..eb2e9c90ce4 100644 --- a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js +++ b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js @@ -132,21 +132,29 @@ export function lastElementOf(arr: T[]): T | undefined { } //// [/src/zoo/zoo.ts] +import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +} + Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json * src/animals/tsconfig.json * src/zoo/tsconfig.json * src/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... src/animals/index.ts:1:20 - error TS6059: File '/src/animals/animal.ts' is not under 'rootDir' '/src/core'. 'rootDir' is expected to contain all source files. @@ -199,13 +207,13 @@ Output::    ~~~ File is included via import here. -[12:00:00 AM] Project 'src/animals/tsconfig.json' can't be built because its dependency 'src/core' has errors +[12:00:14 AM] Project 'src/animals/tsconfig.json' can't be built because its dependency 'src/core' has errors -[12:00:00 AM] Skipping build of project '/src/animals/tsconfig.json' because its dependency '/src/core' has errors +[12:00:15 AM] Skipping build of project '/src/animals/tsconfig.json' because its dependency '/src/core' has errors -[12:00:00 AM] Project 'src/zoo/tsconfig.json' can't be built because its dependency 'src/animals' was not built +[12:00:16 AM] Project 'src/zoo/tsconfig.json' can't be built because its dependency 'src/animals' was not built -[12:00:00 AM] Skipping build of project '/src/zoo/tsconfig.json' because its dependency '/src/animals' was not built +[12:00:17 AM] Skipping build of project '/src/zoo/tsconfig.json' because its dependency '/src/animals' was not built Found 7 errors. diff --git a/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js b/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js index f84d662938d..7a5ecdf0d2b 100644 --- a/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js +++ b/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js @@ -1,14 +1,53 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/animals/animal.ts] +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} //// [/src/animals/dog.ts] +import Animal from '.'; +import { makeRandomName } from '../core/utilities'; + +export interface Dog extends Animal { + woof(): void; + name: string; +} + +export function createDog(): Dog { + return ({ + size: "medium", + woof: function(this: Dog) { + console.log(`${this.name} says "Woof"!`); + }, + name: makeRandomName() + }); +} + //// [/src/animals/index.ts] +import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; //// [/src/animals/tsconfig.json] @@ -40,6 +79,16 @@ Input:: //// [/src/core/utilities.ts] +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +} + + //// [/src/tsconfig-base.json] { @@ -87,13 +136,21 @@ Input:: } //// [/src/zoo/zoo.ts] +import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +} + Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/animals/tsconfig.json * src/zoo/tsconfig.json * src/core/tsconfig.json diff --git a/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js b/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js index 3bfd6267acf..3d6db1f835f 100644 --- a/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js +++ b/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js @@ -145,23 +145,23 @@ export function createZoo(): Array { Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/core/tsconfig.json * src/animals/tsconfig.json * src/zoo/tsconfig.json * src/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist +[12:00:07 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/lib/core/utilities.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:08 AM] Building project '/src/core/tsconfig.json'... -[12:00:00 AM] Project 'src/animals/tsconfig.json' is out of date because output file 'src/lib/animals/animal.js' does not exist +[12:00:15 AM] Project 'src/animals/tsconfig.json' is out of date because output file 'src/lib/animals/animal.js' does not exist -[12:00:00 AM] Building project '/src/animals/tsconfig.json'... +[12:00:16 AM] Building project '/src/animals/tsconfig.json'... -[12:00:00 AM] Project 'src/zoo/tsconfig.json' is out of date because output file 'src/lib/zoo/zoo.js' does not exist +[12:00:26 AM] Project 'src/zoo/tsconfig.json' is out of date because output file 'src/lib/zoo/zoo.js' does not exist -[12:00:00 AM] Building project '/src/zoo/tsconfig.json'... +[12:00:27 AM] Building project '/src/zoo/tsconfig.json'... exitCode:: ExitStatus.Success @@ -220,7 +220,7 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () //// [/src/lib/animals/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n","-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","signature":"13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n"},{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n"},"-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n",{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} //// [/src/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -240,6 +240,9 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () [ "../../animals/animal.ts", "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" ] ], "fileInfos": { @@ -250,11 +253,11 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () }, "../../animals/animal.ts": { "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", - "signature": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + "signature": "13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" }, "../../animals/index.ts": { "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", - "signature": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" + "signature": "4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" }, "../core/utilities.d.ts": { "version": "-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n", @@ -262,7 +265,7 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () }, "../../animals/dog.ts": { "version": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n", - "signature": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n" + "signature": "10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n" } }, "options": { @@ -290,8 +293,7 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () }, "exportedModulesMap": { "../../animals/dog.ts": [ - "../../animals/index.ts", - "../core/utilities.d.ts" + "../../animals/index.ts" ], "../../animals/index.ts": [ "../../animals/animal.ts", @@ -307,11 +309,11 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () ] }, "version": "FakeTSVersion", - "size": 1903 + "size": 2443 } //// [/src/lib/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","signature":"-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -328,7 +330,7 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () }, "../../core/utilities.ts": { "version": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n", - "signature": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n" + "signature": "-8177343116-export declare function makeRandomName(): string;\r\nexport declare function lastElementOf(arr: T[]): T | undefined;\r\n" } }, "options": { @@ -352,7 +354,7 @@ Object.defineProperty(exports, "createDog", { enumerable: true, get: function () ] }, "version": "FakeTSVersion", - "size": 1149 + "size": 1311 } //// [/src/lib/core/utilities.d.ts] @@ -377,7 +379,7 @@ exports.lastElementOf = lastElementOf; //// [/src/lib/zoo/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n","4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"fileIdsList":[[4],[2,3]],"referencedMap":[[3,1],[4,2],[5,1]],"exportedModulesMap":[[3,1],[4,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"13427676350-export declare type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","10854678623-import Animal from '.';\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\nexport declare function createDog(): Dog;\r\n","4477582546-import Animal from './animal';\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n",{"version":"8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n","signature":"-17433436879-import { Dog } from '../animals/index';\r\nexport declare function createZoo(): Array;\r\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"fileIdsList":[[4],[2,3]],"referencedMap":[[3,1],[4,2],[5,1]],"exportedModulesMap":[[3,1],[4,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} //// [/src/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -418,7 +420,7 @@ exports.lastElementOf = lastElementOf; }, "../../zoo/zoo.ts": { "version": "8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n", - "signature": "8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n" + "signature": "-17433436879-import { Dog } from '../animals/index';\r\nexport declare function createZoo(): Array;\r\n" } }, "options": { @@ -467,7 +469,7 @@ exports.lastElementOf = lastElementOf; ] }, "version": "FakeTSVersion", - "size": 1670 + "size": 1805 } //// [/src/lib/zoo/zoo.d.ts] diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js index 85cba94d561..2e34936ad43 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -70,12 +70,12 @@ export { C } from "./c"; Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist +[12:00:07 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:08 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -120,7 +120,7 @@ export { C } from "./c"; {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"} //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2],[4],[2,3,4]],"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"exportedModulesMap":[[4,1],[3,2],[2,3],[5,4]],"semanticDiagnosticsPerFile":[1,4,3,2,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},{"version":"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n"},{"version":"-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-4206296467-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n"},{"version":"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","signature":"-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2],[4],[2,3,4]],"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"exportedModulesMap":[[4,1],[3,2],[2,3],[5,4]],"semanticDiagnosticsPerFile":[1,4,3,2,5]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -156,19 +156,19 @@ export { C } from "./c"; }, "./src/c.ts": { "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", - "signature": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n" + "signature": "-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n" }, "./src/b.ts": { "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", - "signature": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n" + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" }, "./src/a.ts": { "version": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n", - "signature": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n" + "signature": "-4206296467-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n" }, "./src/index.ts": { "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", - "signature": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n" + "signature": "-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n" } }, "options": { @@ -225,7 +225,7 @@ export { C } from "./c"; ] }, "version": "FakeTSVersion", - "size": 1328 + "size": 1790 } @@ -244,12 +244,12 @@ export interface A { Output:: /lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: +[12:00:21 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' +[12:00:22 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:23 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js index 4ff553ac46c..d54ea707e2c 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -70,12 +70,12 @@ export { C } from "./c"; Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist +[12:00:08 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:09 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -108,7 +108,7 @@ export { C } from "./c"; //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2],[4],[2,3,4]],"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"exportedModulesMap":[[4,1],[3,2],[2,3],[5,4]],"semanticDiagnosticsPerFile":[1,4,3,2,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},{"version":"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n"},{"version":"-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-4206296467-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n"},{"version":"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","signature":"-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n"}],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2],[4],[2,3,4]],"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"exportedModulesMap":[[4,1],[3,2],[2,3],[5,4]],"semanticDiagnosticsPerFile":[1,4,3,2,5]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -144,19 +144,19 @@ export { C } from "./c"; }, "./src/c.ts": { "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", - "signature": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n" + "signature": "-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n" }, "./src/b.ts": { "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", - "signature": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n" + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" }, "./src/a.ts": { "version": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n", - "signature": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n" + "signature": "-4206296467-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n" }, "./src/index.ts": { "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", - "signature": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n" + "signature": "-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n" } }, "options": { @@ -212,7 +212,7 @@ export { C } from "./c"; ] }, "version": "FakeTSVersion", - "size": 1306 + "size": 1768 } @@ -231,12 +231,12 @@ export interface A { Output:: /lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: +[12:00:18 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' +[12:00:19 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:20 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js index 1c6cd86d434..9f067f0726e 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -64,12 +64,12 @@ export interface C { Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist +[12:00:09 AM] Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:10 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -107,7 +107,7 @@ export interface C { {"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"11179224639-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n","429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"11179224639-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n","signature":"-4181862109-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n}\r\n"},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},{"version":"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -134,15 +134,15 @@ export interface C { }, "./src/a.ts": { "version": "11179224639-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n", - "signature": "11179224639-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n" + "signature": "-4181862109-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n}\r\n" }, "./src/c.ts": { "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", - "signature": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n" + "signature": "-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n" }, "./src/b.ts": { "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", - "signature": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n" + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" } }, "options": { @@ -182,7 +182,7 @@ export interface C { ] }, "version": "FakeTSVersion", - "size": 1184 + "size": 1541 } @@ -202,12 +202,14 @@ export interface A { Output:: /lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: +[12:00:21 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' +[12:00:22 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:23 AM] Building project '/src/tsconfig.json'... + +[12:00:28 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -216,10 +218,7 @@ exitCode:: ExitStatus.Success //// [/src/lib/a.d.ts.map] {"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} -//// [/src/lib/b.d.ts] file written with same contents -//// [/src/lib/b.d.ts.map] file written with same contents -//// [/src/lib/c.d.ts] file written with same contents -//// [/src/lib/c.d.ts.map] file written with same contents +//// [/src/lib/b.d.ts] file changed its modified time //// [/src/tsconfig.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"6651905050-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}\n","signature":"-4181862109-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n}\r\n"},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},{"version":"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3]},"version":"FakeTSVersion"} @@ -316,12 +315,12 @@ export interface A { Output:: /lib/tsc --b /src --verbose -[12:07:00 AM] Projects in this build: +[12:00:35 AM] Projects in this build: * src/tsconfig.json -[12:07:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' +[12:00:36 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' -[12:07:00 AM] Building project '/src/tsconfig.json'... +[12:00:37 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -344,7 +343,7 @@ export interface A { //// [/src/lib/c.d.ts] file written with same contents //// [/src/lib/c.d.ts.map] file written with same contents //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5380514971-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-6995298949-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n foo: any;\r\n}\r\n"},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5380514971-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-6995298949-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n foo: any;\r\n}\r\n"},{"version":"429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n"},{"version":"-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -379,7 +378,7 @@ export interface A { }, "./src/b.ts": { "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", - "signature": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n" + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" } }, "options": { @@ -419,6 +418,6 @@ export interface A { ] }, "version": "FakeTSVersion", - "size": 1469 + "size": 1580 } diff --git a/tests/baselines/reference/tsbuild/emptyFiles/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js b/tests/baselines/reference/tsbuild/emptyFiles/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js index e39985e53a2..575b2013654 100644 --- a/tests/baselines/reference/tsbuild/emptyFiles/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js +++ b/tests/baselines/reference/tsbuild/emptyFiles/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js @@ -30,6 +30,16 @@ export function multiply(a: number, b: number) { return a * b; } //// [/src/no-references/tsconfig.json] +{ + "references": [], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/with-references/tsconfig.json] @@ -70,7 +80,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7111849992-export declare function multiply(a: number, b: number): number;\r\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -87,7 +97,7 @@ exports.multiply = multiply; }, "./index.ts": { "version": "5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7111849992-export declare function multiply(a: number, b: number): number;\r\n" } }, "options": { @@ -104,6 +114,6 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 837 + "size": 943 } diff --git a/tests/baselines/reference/tsbuild/emptyFiles/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js b/tests/baselines/reference/tsbuild/emptyFiles/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js index 12eee2bc1e7..de16bd64938 100644 --- a/tests/baselines/reference/tsbuild/emptyFiles/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js +++ b/tests/baselines/reference/tsbuild/emptyFiles/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js @@ -1,11 +1,32 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/index.ts] +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} //// [/src/no-references/tsconfig.json] @@ -22,6 +43,18 @@ Input:: //// [/src/with-references/tsconfig.json] +{ + "references": [ + { "path": "../core" }, + ], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} diff --git a/tests/baselines/reference/tsbuild/exitCodeOnBogusFile/test-exit-code.js b/tests/baselines/reference/tsbuild/exitCodeOnBogusFile/test-exit-code.js index 2a7d6272ff3..e2cf8538618 100644 --- a/tests/baselines/reference/tsbuild/exitCodeOnBogusFile/test-exit-code.js +++ b/tests/baselines/reference/tsbuild/exitCodeOnBogusFile/test-exit-code.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js index 6b4be6975b5..eb3f872d7a9 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js @@ -72,12 +72,12 @@ export { default as bar } from './bar'; Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist +[12:00:08 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:09 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -152,279 +152,7 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} - -//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../lazyindex.ts", - "../index.ts" - ], - "fileNamesList": [ - [ - "../bundling.ts", - "../lazyindex.ts" - ], - [ - "../bar.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../bar.ts": { - "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", - "signature": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});" - }, - "../bundling.ts": { - "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" - }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, - "../lazyindex.ts": { - "version": "-6956449754-export { default as bar } from './bar';\n", - "signature": "-6956449754-export { default as bar } from './bar';\n" - }, - "../index.ts": { - "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" - } - }, - "options": { - "declaration": true, - "outDir": "./", - "target": 1 - }, - "referencedMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "exportedModulesMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../index.ts", - "../lazyindex.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1937 -} - - - -Change:: incremental-declaration-changes -Input:: -//// [/src/bar.ts] -interface RawAction { - (...args: any[]): Promise | void; -} -interface ActionFactory { - (target: T): T; -} -declare function foo(): ActionFactory; -export default foo()(function foobar(): void { -}); - - - -Output:: -/lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: - * src/tsconfig.json - -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' - -[12:04:00 AM] Building project '/src/tsconfig.json'... - -[12:04:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/obj/bar.d.ts] -declare const _default: () => void; -export default _default; - - -//// [/src/obj/bar.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = foo()(function foobar() { -}); - - -//// [/src/obj/index.d.ts] -import { LazyAction } from './bundling'; -export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; - - -//// [/src/obj/lazyIndex.d.ts] file written with same contents -//// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} - -//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../lazyindex.ts", - "../index.ts" - ], - "fileNamesList": [ - [ - "../bundling.ts", - "../lazyindex.ts" - ], - [ - "../bar.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../bar.ts": { - "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", - "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" - }, - "../bundling.ts": { - "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" - }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, - "../lazyindex.ts": { - "version": "-6956449754-export { default as bar } from './bar';\n", - "signature": "-6956449754-export { default as bar } from './bar';\n" - }, - "../index.ts": { - "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" - } - }, - "options": { - "declaration": true, - "outDir": "./", - "target": 1 - }, - "referencedMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "exportedModulesMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../index.ts", - "../lazyindex.ts" - ] - }, - "version": "FakeTSVersion", - "size": 2029 -} - - - -Change:: incremental-declaration-changes -Input:: -//// [/src/bar.ts] -interface RawAction { - (...args: any[]): Promise | void; -} -interface ActionFactory { - (target: T): T; -} -declare function foo(): ActionFactory; -export default foo()(function foobar(param: string): void { -}); - - - -Output:: -/lib/tsc --b /src --verbose -[12:07:00 AM] Projects in this build: - * src/tsconfig.json - -[12:07:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' - -[12:07:00 AM] Building project '/src/tsconfig.json'... - -[12:07:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/obj/bar.d.ts] -declare const _default: (param: string) => void; -export default _default; - - -//// [/src/obj/bar.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = foo()(function foobar(param) { -}); - - -//// [/src/obj/index.d.ts] -import { LazyAction } from './bundling'; -export declare const lazyBar: LazyAction<(param: string) => void, typeof import("./lazyIndex")>; - - -//// [/src/obj/lazyIndex.d.ts] file written with same contents -//// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -458,7 +186,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -467,11 +195,11 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", - "signature": "-6956449754-export { default as bar } from './bar';\n" + "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { @@ -507,6 +235,278 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( ] }, "version": "FakeTSVersion", - "size": 2056 + "size": 2690 +} + + + +Change:: incremental-declaration-changes +Input:: +//// [/src/bar.ts] +interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +}); + + + +Output:: +/lib/tsc --b /src --verbose +[12:00:22 AM] Projects in this build: + * src/tsconfig.json + +[12:00:23 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +[12:00:24 AM] Building project '/src/tsconfig.json'... + +[12:00:31 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/obj/bar.d.ts] +declare const _default: () => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar() { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/lazyIndex.d.ts] file written with same contents +//// [/src/obj/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} + +//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../lazyindex.ts", + "../index.ts" + ], + "fileNamesList": [ + [ + "../bundling.ts", + "../lazyindex.ts" + ], + [ + "../bar.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../bar.ts": { + "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", + "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" + }, + "../bundling.ts": { + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" + }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, + "../lazyindex.ts": { + "version": "-6956449754-export { default as bar } from './bar';\n", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" + }, + "../index.ts": { + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n" + } + }, + "options": { + "declaration": true, + "outDir": "./", + "target": 1 + }, + "referencedMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "exportedModulesMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../index.ts", + "../lazyindex.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2649 +} + + + +Change:: incremental-declaration-changes +Input:: +//// [/src/bar.ts] +interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +}); + + + +Output:: +/lib/tsc --b /src --verbose +[12:00:38 AM] Projects in this build: + * src/tsconfig.json + +[12:00:39 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +[12:00:40 AM] Building project '/src/tsconfig.json'... + +[12:00:47 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/obj/bar.d.ts] +declare const _default: (param: string) => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar(param) { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<(param: string) => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/lazyIndex.d.ts] file written with same contents +//// [/src/obj/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} + +//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../lazyindex.ts", + "../index.ts" + ], + "fileNamesList": [ + [ + "../bundling.ts", + "../lazyindex.ts" + ], + [ + "../bar.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../bar.ts": { + "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", + "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n" + }, + "../bundling.ts": { + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" + }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, + "../lazyindex.ts": { + "version": "-6956449754-export { default as bar } from './bar';\n", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" + }, + "../index.ts": { + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" + } + }, + "options": { + "declaration": true, + "outDir": "./", + "target": 1 + }, + "referencedMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "exportedModulesMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../index.ts", + "../lazyindex.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2690 } diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js index ddf3fdf8cf5..b507ad314cd 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js @@ -72,12 +72,12 @@ export { default as bar } from './bar'; Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist +[12:00:07 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:08 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -152,7 +152,7 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -182,11 +182,11 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret }, "../bar.ts": { "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", - "signature": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});" + "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n" }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -195,11 +195,11 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret }, "../lazyindex.ts": { "version": "-6956449754-export { default as bar } from './bar';\n", - "signature": "-6956449754-export { default as bar } from './bar';\n" + "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { @@ -235,7 +235,7 @@ Object.defineProperty(exports, "bar", { enumerable: true, get: function () { ret ] }, "version": "FakeTSVersion", - "size": 1937 + "size": 2690 } @@ -257,14 +257,14 @@ export default foo()(function foobar(): void { Output:: /lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: +[12:00:21 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' +[12:00:22 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:23 AM] Building project '/src/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... +[12:00:31 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -286,11 +286,10 @@ import { LazyAction } from './bundling'; export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; -//// [/src/obj/index.js] file written with same contents //// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/lazyIndex.js] file written with same contents //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -324,7 +323,7 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -373,7 +372,7 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" ] }, "version": "FakeTSVersion", - "size": 2282 + "size": 2649 } @@ -395,14 +394,14 @@ export default foo()(function foobar(param: string): void { Output:: /lib/tsc --b /src --verbose -[12:07:00 AM] Projects in this build: +[12:00:37 AM] Projects in this build: * src/tsconfig.json -[12:07:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' +[12:00:38 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' -[12:07:00 AM] Building project '/src/tsconfig.json'... +[12:00:39 AM] Building project '/src/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... +[12:00:47 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -427,7 +426,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( //// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/lazyIndex.js] file written with same contents //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-6956449754-export { default as bar } from './bar';\n","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -461,7 +460,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -474,7 +473,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( }, "../index.ts": { "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { @@ -510,6 +509,6 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import( ] }, "version": "FakeTSVersion", - "size": 2138 + "size": 2690 } diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js index 8f5d81972d4..9ddb383e8d5 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -74,12 +74,12 @@ bar("hello"); Output:: /lib/tsc --b /src --verbose -[12:01:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist +[12:00:09 AM] Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:10 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -156,279 +156,7 @@ var bar_2 = require("./bar"); //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} - -//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../lazyindex.ts", - "../index.ts" - ], - "fileNamesList": [ - [ - "../bundling.ts", - "../lazyindex.ts" - ], - [ - "../bar.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../bar.ts": { - "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", - "signature": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});" - }, - "../bundling.ts": { - "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" - }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, - "../lazyindex.ts": { - "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", - "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" - }, - "../index.ts": { - "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" - } - }, - "options": { - "declaration": true, - "outDir": "./", - "target": 1 - }, - "referencedMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "exportedModulesMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../index.ts", - "../lazyindex.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1994 -} - - - -Change:: incremental-declaration-changes -Input:: -//// [/src/bar.ts] -interface RawAction { - (...args: any[]): Promise | void; -} -interface ActionFactory { - (target: T): T; -} -declare function foo(): ActionFactory; -export default foo()(function foobar(): void { -}); - - - -Output:: -/lib/tsc --b /src --verbose -[12:04:00 AM] Projects in this build: - * src/tsconfig.json - -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' - -[12:04:00 AM] Building project '/src/tsconfig.json'... - -src/lazyIndex.ts:4:5 - error TS2554: Expected 0 arguments, but got 1. - -4 bar("hello"); -   ~~~~~~~ - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped - - -//// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,[5,[{"file":"../lazyindex.ts","start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[[2,1],[6,0],[5,0]]},"version":"FakeTSVersion"} - -//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../lazyindex.ts", - "../index.ts" - ], - "fileNamesList": [ - [ - "../bundling.ts", - "../lazyindex.ts" - ], - [ - "../bar.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../bar.ts": { - "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", - "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" - }, - "../bundling.ts": { - "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" - }, - "../global.d.ts": { - "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", - "affectsGlobalScope": true - }, - "../lazyindex.ts": { - "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", - "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" - }, - "../index.ts": { - "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" - } - }, - "options": { - "declaration": true, - "outDir": "./", - "target": 1 - }, - "referencedMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "exportedModulesMap": { - "../index.ts": [ - "../bundling.ts", - "../lazyindex.ts" - ], - "../lazyindex.ts": [ - "../bar.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../bar.ts", - "../bundling.ts", - "../global.d.ts", - "../index.ts", - [ - "../lazyindex.ts", - [ - { - "file": "../lazyindex.ts", - "start": 85, - "length": 7, - "messageText": "Expected 0 arguments, but got 1.", - "category": 1, - "code": 2554 - } - ] - ] - ], - "affectedFilesPendingEmit": [ - [ - "../bar.ts", - "Full" - ], - [ - "../index.ts", - "DtsOnly" - ], - [ - "../lazyindex.ts", - "DtsOnly" - ] - ] - }, - "version": "FakeTSVersion", - "size": 2260 -} - - - -Change:: incremental-declaration-changes -Input:: -//// [/src/bar.ts] -interface RawAction { - (...args: any[]): Promise | void; -} -interface ActionFactory { - (target: T): T; -} -declare function foo(): ActionFactory; -export default foo()(function foobar(param: string): void { -}); - - - -Output:: -/lib/tsc --b /src --verbose -[12:07:00 AM] Projects in this build: - * src/tsconfig.json - -[12:07:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' - -[12:07:00 AM] Building project '/src/tsconfig.json'... - -[12:07:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/obj/bar.d.ts] file written with same contents -//// [/src/obj/bar.js] file written with same contents -//// [/src/obj/index.d.ts] file written with same contents -//// [/src/obj/lazyIndex.d.ts] file written with same contents -//// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -462,7 +190,7 @@ exitCode:: ExitStatus.Success }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -471,11 +199,11 @@ exitCode:: ExitStatus.Success }, "../lazyindex.ts": { "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", - "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" + "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { @@ -511,7 +239,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 2113 + "size": 2747 } @@ -533,12 +261,12 @@ export default foo()(function foobar(): void { Output:: /lib/tsc --b /src --verbose -[12:10:00 AM] Projects in this build: +[12:00:23 AM] Projects in this build: * src/tsconfig.json -[12:10:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' +[12:00:24 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' -[12:10:00 AM] Building project '/src/tsconfig.json'... +[12:00:25 AM] Building project '/src/tsconfig.json'... src/lazyIndex.ts:4:5 - error TS2554: Expected 0 arguments, but got 1. @@ -552,7 +280,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,[5,[{"file":"../lazyindex.ts","start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[[2,1],[6,0],[5,0]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,[5,[{"file":"../lazyindex.ts","start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[[2,1],[6,0],[5,0]]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -586,7 +314,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -661,65 +389,46 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] }, "version": "FakeTSVersion", - "size": 2260 + "size": 2627 } -Change:: Fix Error +Change:: incremental-declaration-changes Input:: -//// [/src/lazyIndex.ts] -export { default as bar } from './bar'; - -import { default as bar } from './bar'; -bar(); +//// [/src/bar.ts] +interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +}); Output:: /lib/tsc --b /src --verbose -[12:13:00 AM] Projects in this build: +[12:00:29 AM] Projects in this build: * src/tsconfig.json -[12:13:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/lazyIndex.ts' +[12:00:30 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' -[12:13:00 AM] Building project '/src/tsconfig.json'... +[12:00:31 AM] Building project '/src/tsconfig.json'... -[12:13:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... +[12:00:38 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success -//// [/src/obj/bar.d.ts] -declare const _default: () => void; -export default _default; - - -//// [/src/obj/bar.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = foo()(function foobar() { -}); - - -//// [/src/obj/index.d.ts] -import { LazyAction } from './bundling'; -export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; - - +//// [/src/obj/bar.d.ts] file written with same contents +//// [/src/obj/bar.js] file written with same contents +//// [/src/obj/index.d.ts] file written with same contents //// [/src/obj/lazyIndex.d.ts] file written with same contents -//// [/src/obj/lazyIndex.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bar = void 0; -var bar_1 = require("./bar"); -Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return bar_1.default; } }); -var bar_2 = require("./bar"); -(0, bar_2.default)(); - - //// [/src/obj/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n",{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-3721262293-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar();","signature":"-6224542381-export { default as bar } from './bar';\r\n"},"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});","signature":"11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -748,12 +457,12 @@ var bar_2 = require("./bar"); "affectsGlobalScope": true }, "../bar.ts": { - "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", - "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" + "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", + "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n" }, "../bundling.ts": { "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", - "signature": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n" + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", @@ -761,12 +470,12 @@ var bar_2 = require("./bar"); "affectsGlobalScope": true }, "../lazyindex.ts": { - "version": "-3721262293-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar();", + "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", - "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { @@ -802,6 +511,297 @@ var bar_2 = require("./bar"); ] }, "version": "FakeTSVersion", - "size": 2160 + "size": 2747 +} + + + +Change:: incremental-declaration-changes +Input:: +//// [/src/bar.ts] +interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +}); + + + +Output:: +/lib/tsc --b /src --verbose +[12:00:45 AM] Projects in this build: + * src/tsconfig.json + +[12:00:46 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +[12:00:47 AM] Building project '/src/tsconfig.json'... + +src/lazyIndex.ts:4:5 - error TS2554: Expected 0 arguments, but got 1. + +4 bar("hello"); +   ~~~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/src/obj/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);"],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,[5,[{"file":"../lazyindex.ts","start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[[2,1],[6,0],[5,0]]},"version":"FakeTSVersion"} + +//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../lazyindex.ts", + "../index.ts" + ], + "fileNamesList": [ + [ + "../bundling.ts", + "../lazyindex.ts" + ], + [ + "../bar.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../bar.ts": { + "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", + "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" + }, + "../bundling.ts": { + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" + }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, + "../lazyindex.ts": { + "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", + "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" + }, + "../index.ts": { + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);" + } + }, + "options": { + "declaration": true, + "outDir": "./", + "target": 1 + }, + "referencedMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "exportedModulesMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../index.ts", + [ + "../lazyindex.ts", + [ + { + "file": "../lazyindex.ts", + "start": 85, + "length": 7, + "messageText": "Expected 0 arguments, but got 1.", + "category": 1, + "code": 2554 + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "../bar.ts", + "Full" + ], + [ + "../index.ts", + "DtsOnly" + ], + [ + "../lazyindex.ts", + "DtsOnly" + ] + ] + }, + "version": "FakeTSVersion", + "size": 2627 +} + + + +Change:: Fix Error +Input:: +//// [/src/lazyIndex.ts] +export { default as bar } from './bar'; + +import { default as bar } from './bar'; +bar(); + + + +Output:: +/lib/tsc --b /src --verbose +[12:00:51 AM] Projects in this build: + * src/tsconfig.json + +[12:00:52 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/lazyIndex.ts' + +[12:00:53 AM] Building project '/src/tsconfig.json'... + +[12:01:01 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/obj/bar.d.ts] +declare const _default: () => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar() { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/lazyIndex.d.ts] file written with same contents +//// [/src/obj/lazyIndex.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bar = void 0; +var bar_1 = require("./bar"); +Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return bar_1.default; } }); +var bar_2 = require("./bar"); +(0, bar_2.default)(); + + +//// [/src/obj/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});","signature":"-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n"},{"version":"-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n","signature":"-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n"},{"version":"-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}","affectsGlobalScope":true},{"version":"-3721262293-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar();","signature":"-6224542381-export { default as bar } from './bar';\r\n"},{"version":"-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);","signature":"6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n"}],"options":{"declaration":true,"outDir":"./","target":1},"fileIdsList":[[3,5],[2]],"referencedMap":[[6,1],[5,2]],"exportedModulesMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,6,5]},"version":"FakeTSVersion"} + +//// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../lazyindex.ts", + "../index.ts" + ], + "fileNamesList": [ + [ + "../bundling.ts", + "../lazyindex.ts" + ], + [ + "../bar.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../bar.ts": { + "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", + "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" + }, + "../bundling.ts": { + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" + }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "affectsGlobalScope": true + }, + "../lazyindex.ts": { + "version": "-3721262293-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar();", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" + }, + "../index.ts": { + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n" + } + }, + "options": { + "declaration": true, + "outDir": "./", + "target": 1 + }, + "referencedMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "exportedModulesMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../index.ts", + "../lazyindex.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2698 } diff --git a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js index c91586ee3dd..e2b0c11bbcc 100644 --- a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js +++ b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js @@ -133,7 +133,7 @@ module.exports = {}; //// [/lib/common/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib.d.ts","../../src/common/nominal.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-9003723607-/**\n * @template T, Name\n * @typedef {T & {[Symbol.species]: Name}} Nominal\n */\nmodule.exports = {};\n"],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib.d.ts","../../src/common/nominal.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},{"version":"-9003723607-/**\n * @template T, Name\n * @typedef {T & {[Symbol.species]: Name}} Nominal\n */\nmodule.exports = {};\n","signature":"-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/lib/common/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -150,7 +150,7 @@ module.exports = {}; }, "../../src/common/nominal.js": { "version": "-9003723607-/**\n * @template T, Name\n * @typedef {T & {[Symbol.species]: Name}} Nominal\n */\nmodule.exports = {};\n", - "signature": "-9003723607-/**\n * @template T, Name\n * @typedef {T & {[Symbol.species]: Name}} Nominal\n */\nmodule.exports = {};\n" + "signature": "-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" } }, "options": { @@ -168,7 +168,7 @@ module.exports = {}; ] }, "version": "FakeTSVersion", - "size": 1104 + "size": 1221 } //// [/lib/sub-project/index.d.ts] @@ -185,7 +185,7 @@ exports.__esModule = true; //// [/lib/sub-project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../../src/sub-project/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n"],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[2,1,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../../src/sub-project/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n",{"version":"-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n","signature":"-1163946571-export type MyNominal = Nominal;\r\nimport { Nominal } from \"../common/nominal\";\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,1,3]},"version":"FakeTSVersion"} //// [/lib/sub-project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -212,7 +212,7 @@ exports.__esModule = true; }, "../../src/sub-project/index.js": { "version": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n", - "signature": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n" + "signature": "-1163946571-export type MyNominal = Nominal;\r\nimport { Nominal } from \"../common/nominal\";\r\n" } }, "options": { @@ -227,11 +227,7 @@ exports.__esModule = true; "../common/nominal.d.ts" ] }, - "exportedModulesMap": { - "../../src/sub-project/index.js": [ - "../common/nominal.d.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../common/nominal.d.ts", "../lib.d.ts", @@ -239,7 +235,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 1264 + "size": 1405 } //// [/lib/sub-project-2/index.d.ts] @@ -271,7 +267,7 @@ exports.getVar = getVar; //// [/lib/sub-project-2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../src/sub-project-2/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-1163946571-export type MyNominal = Nominal;\r\nimport { Nominal } from \"../common/nominal\";\r\n","9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n"],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[2,1,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../src/sub-project-2/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15964609857-export type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-1163946571-export type MyNominal = Nominal;\r\nimport { Nominal } from \"../common/nominal\";\r\n",{"version":"9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n","signature":"-8647857726-/**\r\n * @return {keyof typeof variable}\r\n */\r\nexport function getVar(): keyof typeof variable;\r\ndeclare namespace variable {\r\n const key: MyNominal;\r\n}\r\nimport { MyNominal } from \"../sub-project/index\";\r\nexport {};\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[2,1,3,4]},"version":"FakeTSVersion"} //// [/lib/sub-project-2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -306,7 +302,7 @@ exports.getVar = getVar; }, "../../src/sub-project-2/index.js": { "version": "9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n", - "signature": "9520601400-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: /** @type {MyNominal} */('value'),\n};\n\n/**\n * @return {keyof typeof variable}\n */\nexport function getVar() {\n return 'key';\n}\n" + "signature": "-8647857726-/**\r\n * @return {keyof typeof variable}\r\n */\r\nexport function getVar(): keyof typeof variable;\r\ndeclare namespace variable {\r\n const key: MyNominal;\r\n}\r\nimport { MyNominal } from \"../sub-project/index\";\r\nexport {};\r\n" } }, "options": { @@ -327,9 +323,6 @@ exports.getVar = getVar; "exportedModulesMap": { "../sub-project/index.d.ts": [ "../common/nominal.d.ts" - ], - "../../src/sub-project-2/index.js": [ - "../sub-project/index.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -340,6 +333,6 @@ exports.getVar = getVar; ] }, "version": "FakeTSVersion", - "size": 1540 + "size": 1812 } diff --git a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-with-non-moved-json-files-and-emits-them-correctly.js b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-with-non-moved-json-files-and-emits-them-correctly.js index 3c400b67add..565c3f004e7 100644 --- a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-with-non-moved-json-files-and-emits-them-correctly.js +++ b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-with-non-moved-json-files-and-emits-them-correctly.js @@ -136,7 +136,7 @@ exports.m = common_1["default"]; //// [/out/sub-project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../../src/common/obj.json","../../src/common/index.d.ts","../../src/sub-project/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"2151907832-{\n \"val\": 42\n}","-4085459678-import x = require(\"./obj.json\");\r\nexport = x;\r\n","-14684157955-import mod from '../common';\n\nexport const m = mod;\n"],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../../src/common/obj.json","../../src/common/index.d.ts","../../src/sub-project/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"2151907832-{\n \"val\": 42\n}","-4085459678-import x = require(\"./obj.json\");\r\nexport = x;\r\n",{"version":"-14684157955-import mod from '../common';\n\nexport const m = mod;\n","signature":"-15768184370-export const m: {\r\n val: number;\r\n};\r\n"}],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/out/sub-project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -171,7 +171,7 @@ exports.m = common_1["default"]; }, "../../src/sub-project/index.js": { "version": "-14684157955-import mod from '../common';\n\nexport const m = mod;\n", - "signature": "-14684157955-import mod from '../common';\n\nexport const m = mod;\n" + "signature": "-15768184370-export const m: {\r\n val: number;\r\n};\r\n" } }, "options": { @@ -193,9 +193,6 @@ exports.m = common_1["default"]; "exportedModulesMap": { "../../src/common/index.d.ts": [ "../../src/common/obj.json" - ], - "../../src/sub-project/index.js": [ - "../../src/common/index.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -206,7 +203,7 @@ exports.m = common_1["default"]; ] }, "version": "FakeTSVersion", - "size": 1299 + "size": 1380 } //// [/out/sub-project-2/index.d.ts] @@ -232,7 +229,7 @@ exports.getVar = getVar; //// [/out/sub-project-2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../sub-project/index.d.ts","../../src/sub-project-2/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15768184370-export const m: {\r\n val: number;\r\n};\r\n","13545386800-import { m } from '../sub-project/index';\n\nconst variable = {\n key: m,\n};\n\nexport function getVar() {\n return variable;\n}\n"],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../sub-project/index.d.ts","../../src/sub-project-2/index.js"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-15768184370-export const m: {\r\n val: number;\r\n};\r\n",{"version":"13545386800-import { m } from '../sub-project/index';\n\nconst variable = {\n key: m,\n};\n\nexport function getVar() {\n return variable;\n}\n","signature":"-2686589794-export function getVar(): {\r\n key: {\r\n val: number;\r\n };\r\n};\r\n"}],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/out/sub-project-2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -259,7 +256,7 @@ exports.getVar = getVar; }, "../../src/sub-project-2/index.js": { "version": "13545386800-import { m } from '../sub-project/index';\n\nconst variable = {\n key: m,\n};\n\nexport function getVar() {\n return variable;\n}\n", - "signature": "13545386800-import { m } from '../sub-project/index';\n\nconst variable = {\n key: m,\n};\n\nexport function getVar() {\n return variable;\n}\n" + "signature": "-2686589794-export function getVar(): {\r\n key: {\r\n val: number;\r\n };\r\n};\r\n" } }, "options": { @@ -275,11 +272,7 @@ exports.getVar = getVar; "../sub-project/index.d.ts" ] }, - "exportedModulesMap": { - "../../src/sub-project-2/index.js": [ - "../sub-project/index.d.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../sub-project/index.d.ts", @@ -287,7 +280,7 @@ exports.getVar = getVar; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1412 } //// [/src/common/index.d.ts] @@ -302,7 +295,7 @@ module.exports = x; //// [/src/common/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./obj.json","./index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"2151907832-{\n \"val\": 42\n}","-5032674136-import x = require(\"./obj.json\");\nexport = x;\n"],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"../..","rootDir":"..","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./obj.json","./index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"2151907832-{\n \"val\": 42\n}",{"version":"-5032674136-import x = require(\"./obj.json\");\nexport = x;\n","signature":"-4085459678-import x = require(\"./obj.json\");\r\nexport = x;\r\n"}],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"outDir":"../..","rootDir":"..","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/common/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -329,7 +322,7 @@ module.exports = x; }, "./index.ts": { "version": "-5032674136-import x = require(\"./obj.json\");\nexport = x;\n", - "signature": "-5032674136-import x = require(\"./obj.json\");\nexport = x;\n" + "signature": "-4085459678-import x = require(\"./obj.json\");\r\nexport = x;\r\n" } }, "options": { @@ -357,6 +350,6 @@ module.exports = x; ] }, "version": "FakeTSVersion", - "size": 1137 + "size": 1230 } diff --git a/tests/baselines/reference/tsbuild/lateBoundSymbol/interface-is-merged-and-contains-late-bound-member.js b/tests/baselines/reference/tsbuild/lateBoundSymbol/interface-is-merged-and-contains-late-bound-member.js index b7b96271b4e..9345e1527b5 100644 --- a/tests/baselines/reference/tsbuild/lateBoundSymbol/interface-is-merged-and-contains-late-bound-member.js +++ b/tests/baselines/reference/tsbuild/lateBoundSymbol/interface-is-merged-and-contains-late-bound-member.js @@ -48,12 +48,12 @@ type A = HKT[typeof sym]; Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/src/hkt.js' does not exist +[12:00:07 AM] Project 'src/tsconfig.json' is out of date because output file 'src/src/hkt.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:08 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -155,14 +155,14 @@ type A = HKT[typeof sym]; Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/src/hkt.js' is older than newest input 'src/src/main.ts' +[12:00:15 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/src/hkt.js' is older than newest input 'src/src/main.ts' -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:16 AM] Building project '/src/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... +[12:00:20 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -258,14 +258,14 @@ type A = HKT[typeof sym];const x = 10; Output:: /lib/tsc --b /src/tsconfig.json --verbose -[12:07:00 AM] Projects in this build: +[12:00:24 AM] Projects in this build: * src/tsconfig.json -[12:07:00 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/src/hkt.js' is older than newest input 'src/src/main.ts' +[12:00:25 AM] Project 'src/tsconfig.json' is out of date because oldest output 'src/src/hkt.js' is older than newest input 'src/src/main.ts' -[12:07:00 AM] Building project '/src/tsconfig.json'... +[12:00:26 AM] Building project '/src/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... +[12:00:30 AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js index 0ee13b9f545..c55b036326f 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js @@ -103,8 +103,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/packages/pkg2/const.ts (used version) -/user/username/projects/myproject/packages/pkg2/index.ts (used version) +/user/username/projects/myproject/packages/pkg2/const.ts (computed .d.ts during emit) +/user/username/projects/myproject/packages/pkg2/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","preserveSymlinks":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} @@ -154,7 +154,7 @@ export type { TheNum } from 'const'; //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-11202312776-export type TheNum = 42;","-10837689162-export type { TheNum } from 'const';"],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-11202312776-export type TheNum = 42;","signature":"-9649133742-export declare type TheNum = 42;\n"},{"version":"-10837689162-export type { TheNum } from 'const';","signature":"-9751391360-export type { TheNum } from 'const';\n"}],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -177,11 +177,11 @@ export type { TheNum } from 'const'; }, "../const.ts": { "version": "-11202312776-export type TheNum = 42;", - "signature": "-11202312776-export type TheNum = 42;" + "signature": "-9649133742-export declare type TheNum = 42;\n" }, "../index.ts": { "version": "-10837689162-export type { TheNum } from 'const';", - "signature": "-10837689162-export type { TheNum } from 'const';" + "signature": "-9751391360-export type { TheNum } from 'const';\n" } }, "options": { @@ -205,7 +205,7 @@ export type { TheNum } from 'const'; ] }, "version": "FakeTSVersion", - "size": 777 + "size": 927 } //// [/user/username/projects/myproject/packages/pkg1/build/index.js] diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js index 6f698d19a52..2f25668c14d 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js @@ -104,8 +104,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/packages/pkg2/const.ts (used version) -/user/username/projects/myproject/packages/pkg2/index.ts (used version) +/user/username/projects/myproject/packages/pkg2/const.ts (computed .d.ts during emit) +/user/username/projects/myproject/packages/pkg2/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} @@ -155,7 +155,7 @@ export type { TheNum } from 'const'; //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-11202312776-export type TheNum = 42;","-10837689162-export type { TheNum } from 'const';"],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-11202312776-export type TheNum = 42;","signature":"-9649133742-export declare type TheNum = 42;\n"},{"version":"-10837689162-export type { TheNum } from 'const';","signature":"-9751391360-export type { TheNum } from 'const';\n"}],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -178,11 +178,11 @@ export type { TheNum } from 'const'; }, "../const.ts": { "version": "-11202312776-export type TheNum = 42;", - "signature": "-11202312776-export type TheNum = 42;" + "signature": "-9649133742-export declare type TheNum = 42;\n" }, "../index.ts": { "version": "-10837689162-export type { TheNum } from 'const';", - "signature": "-10837689162-export type { TheNum } from 'const';" + "signature": "-9751391360-export type { TheNum } from 'const';\n" } }, "options": { @@ -206,7 +206,7 @@ export type { TheNum } from 'const'; ] }, "version": "FakeTSVersion", - "size": 777 + "size": 927 } //// [/user/username/projects/myproject/packages/pkg1/build/index.js] diff --git a/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js b/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js index d45fadacea0..577f875cc7c 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js @@ -36,13 +36,13 @@ declare type TheNum2 = "type2"; Output:: /lib/tsc -b /src/packages/pkg1.tsconfig.json /src/packages/pkg2.tsconfig.json --verbose --traceResolution -[12:00:00 AM] Projects in this build: +[12:00:17 AM] Projects in this build: * src/packages/pkg1.tsconfig.json * src/packages/pkg2.tsconfig.json -[12:00:00 AM] Project 'src/packages/pkg1.tsconfig.json' is out of date because output file 'src/packages/pkg1_index.js' does not exist +[12:00:18 AM] Project 'src/packages/pkg1.tsconfig.json' is out of date because output file 'src/packages/pkg1_index.js' does not exist -[12:00:00 AM] Building project '/src/packages/pkg1.tsconfig.json'... +[12:00:19 AM] Building project '/src/packages/pkg1.tsconfig.json'... ======== Resolving type reference directive 'sometype', containing file '/src/packages/__inferred type names__.ts', root directory '/src/packages/typeroot1'. ======== Resolving with primary search path '/src/packages/typeroot1'. @@ -50,9 +50,9 @@ File '/src/packages/typeroot1/sometype/package.json' does not exist. File '/src/packages/typeroot1/sometype/index.d.ts' exist - use it as a name resolution result. Resolving real path for '/src/packages/typeroot1/sometype/index.d.ts', result '/src/packages/typeroot1/sometype/index.d.ts'. ======== Type reference directive 'sometype' was successfully resolved to '/src/packages/typeroot1/sometype/index.d.ts', primary: true. ======== -[12:00:00 AM] Project 'src/packages/pkg2.tsconfig.json' is out of date because output file 'src/packages/pkg2_index.js' does not exist +[12:00:24 AM] Project 'src/packages/pkg2.tsconfig.json' is out of date because output file 'src/packages/pkg2_index.js' does not exist -[12:00:00 AM] Building project '/src/packages/pkg2.tsconfig.json'... +[12:00:25 AM] Building project '/src/packages/pkg2.tsconfig.json'... ======== Resolving type reference directive 'sometype', containing file '/src/packages/__inferred type names__.ts', root directory '/src/packages/typeroot2'. ======== Resolving with primary search path '/src/packages/typeroot2'. @@ -64,7 +64,7 @@ exitCode:: ExitStatus.Success //// [/src/packages/pkg1.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./pkg1_index.ts","./typeroot1/sometype/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9601687719-export const theNum: TheNum = \"type1\";",{"version":"-4557394441-declare type TheNum = \"type1\";","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./pkg1_index.ts","./typeroot1/sometype/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9601687719-export const theNum: TheNum = \"type1\";","signature":"-5685633868-/// \r\nexport declare const theNum: TheNum;\r\n"},{"version":"-4557394441-declare type TheNum = \"type1\";","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/packages/pkg1.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -82,7 +82,7 @@ exitCode:: ExitStatus.Success }, "./pkg1_index.ts": { "version": "-9601687719-export const theNum: TheNum = \"type1\";", - "signature": "-9601687719-export const theNum: TheNum = \"type1\";" + "signature": "-5685633868-/// \r\nexport declare const theNum: TheNum;\r\n" }, "./typeroot1/sometype/index.d.ts": { "version": "-4557394441-declare type TheNum = \"type1\";", @@ -102,7 +102,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 868 + "size": 987 } //// [/src/packages/pkg1_index.d.ts] @@ -118,7 +118,7 @@ exports.theNum = "type1"; //// [/src/packages/pkg2.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./pkg2_index.ts","./typeroot2/sometype/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-12823281204-export const theNum: TheNum2 = \"type2\";",{"version":"-980425686-declare type TheNum2 = \"type2\";","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./pkg2_index.ts","./typeroot2/sometype/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-12823281204-export const theNum: TheNum2 = \"type2\";","signature":"-7237564442-/// \r\nexport declare const theNum: TheNum2;\r\n"},{"version":"-980425686-declare type TheNum2 = \"type2\";","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/packages/pkg2.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -136,7 +136,7 @@ exports.theNum = "type1"; }, "./pkg2_index.ts": { "version": "-12823281204-export const theNum: TheNum2 = \"type2\";", - "signature": "-12823281204-export const theNum: TheNum2 = \"type2\";" + "signature": "-7237564442-/// \r\nexport declare const theNum: TheNum2;\r\n" }, "./typeroot2/sometype/index.d.ts": { "version": "-980425686-declare type TheNum2 = \"type2\";", @@ -156,7 +156,7 @@ exports.theNum = "type1"; ] }, "version": "FakeTSVersion", - "size": 870 + "size": 990 } //// [/src/packages/pkg2_index.d.ts] diff --git a/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js b/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js index 11a82833822..0f60bb939b0 100644 --- a/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js @@ -1,8 +1,20 @@ Input:: //// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; - -//// [/lib/lib.es2020.full.d.ts] +//// [/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -106,7 +118,7 @@ export * from './dogconfig.js'; { "compilerOptions": { "declaration": true, - "module": "node12" + "module": "node16" } } @@ -114,17 +126,17 @@ export * from './dogconfig.js'; Output:: /lib/tsc -b src/src-types src/src-dogs --verbose -[12:00:00 AM] Projects in this build: +[12:00:24 AM] Projects in this build: * src/src-types/tsconfig.json * src/src-dogs/tsconfig.json -[12:00:00 AM] Project 'src/src-types/tsconfig.json' is out of date because output file 'src/src-types/dogconfig.js' does not exist +[12:00:25 AM] Project 'src/src-types/tsconfig.json' is out of date because output file 'src/src-types/dogconfig.js' does not exist -[12:00:00 AM] Building project '/src/src-types/tsconfig.json'... +[12:00:26 AM] Building project '/src/src-types/tsconfig.json'... -[12:00:00 AM] Project 'src/src-dogs/tsconfig.json' is out of date because output file 'src/src-dogs/dog.js' does not exist +[12:00:33 AM] Project 'src/src-dogs/tsconfig.json' is out of date because output file 'src/src-dogs/dog.js' does not exist -[12:00:00 AM] Building project '/src/src-dogs/tsconfig.json'... +[12:00:34 AM] Building project '/src/src-dogs/tsconfig.json'... exitCode:: ExitStatus.Success @@ -186,18 +198,18 @@ export declare class LassieDog extends Dog { import { Dog } from '../dog.js'; import { LASSIE_CONFIG } from './lassieconfig.js'; export class LassieDog extends Dog { + static getDogConfig = () => LASSIE_CONFIG; } -LassieDog.getDogConfig = () => LASSIE_CONFIG; //// [/src/src-dogs/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.es2020.full.d.ts","../src-types/dogconfig.d.ts","../src-types/index.d.ts","./dogconfig.ts","./dog.ts","./lassie/lassieconfig.ts","./lassie/lassiedog.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-2632060142-export interface DogConfig {\r\n name: string;\r\n}\r\n","impliedFormat":99},{"version":"-5608794531-export * from './dogconfig.js';\r\n","impliedFormat":99},{"version":"1966273863-import { DogConfig } from 'src-types';\n\nexport const DOG_CONFIG: DogConfig = {\n name: 'Default dog',\n};\n","impliedFormat":99},{"version":"6091345804-import { DogConfig } from 'src-types';\nimport { DOG_CONFIG } from './dogconfig.js';\n\nexport abstract class Dog {\n\n public static getCapabilities(): DogConfig {\n return DOG_CONFIG;\n }\n}\n","impliedFormat":99},{"version":"4440579024-import { DogConfig } from 'src-types';\n\nexport const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };\n","impliedFormat":99},{"version":"-32303727812-import { Dog } from '../dog.js';\nimport { LASSIE_CONFIG } from './lassieconfig.js';\n\nexport class LassieDog extends Dog {\n protected static getDogConfig = () => LASSIE_CONFIG;\n}\n","impliedFormat":99},{"version":"-15974991320-export * from 'src-types';\nexport * from './lassie/lassiedog.js';\n","impliedFormat":99}],"options":{"composite":true,"declaration":true,"module":100},"fileIdsList":[[3,4],[3],[3,7],[5,6],[2]],"referencedMap":[[5,1],[4,2],[8,3],[6,2],[7,4],[3,5]],"exportedModulesMap":[[5,1],[4,2],[8,3],[6,2],[7,4],[3,5]],"semanticDiagnosticsPerFile":[1,5,4,8,6,7,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.es2022.full.d.ts","../src-types/dogconfig.d.ts","../src-types/index.d.ts","./dogconfig.ts","./dog.ts","./lassie/lassieconfig.ts","./lassie/lassiedog.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-2632060142-export interface DogConfig {\r\n name: string;\r\n}\r\n","impliedFormat":99},{"version":"-5608794531-export * from './dogconfig.js';\r\n","impliedFormat":99},{"version":"1966273863-import { DogConfig } from 'src-types';\n\nexport const DOG_CONFIG: DogConfig = {\n name: 'Default dog',\n};\n","signature":"17588480778-import { DogConfig } from 'src-types';\r\nexport declare const DOG_CONFIG: DogConfig;\r\n","impliedFormat":99},{"version":"6091345804-import { DogConfig } from 'src-types';\nimport { DOG_CONFIG } from './dogconfig.js';\n\nexport abstract class Dog {\n\n public static getCapabilities(): DogConfig {\n return DOG_CONFIG;\n }\n}\n","signature":"22128633249-import { DogConfig } from 'src-types';\r\nexport declare abstract class Dog {\r\n static getCapabilities(): DogConfig;\r\n}\r\n","impliedFormat":99},{"version":"4440579024-import { DogConfig } from 'src-types';\n\nexport const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };\n","signature":"8131483665-import { DogConfig } from 'src-types';\r\nexport declare const LASSIE_CONFIG: DogConfig;\r\n","impliedFormat":99},{"version":"-32303727812-import { Dog } from '../dog.js';\nimport { LASSIE_CONFIG } from './lassieconfig.js';\n\nexport class LassieDog extends Dog {\n protected static getDogConfig = () => LASSIE_CONFIG;\n}\n","signature":"-20244062422-import { Dog } from '../dog.js';\r\nexport declare class LassieDog extends Dog {\r\n protected static getDogConfig: () => import(\"../index.js\").DogConfig;\r\n}\r\n","impliedFormat":99},{"version":"-15974991320-export * from 'src-types';\nexport * from './lassie/lassiedog.js';\n","signature":"-16783836862-export * from 'src-types';\r\nexport * from './lassie/lassiedog.js';\r\n","impliedFormat":99}],"options":{"composite":true,"declaration":true,"module":100},"fileIdsList":[[3,4],[3],[3,7],[5,6],[2],[5,8]],"referencedMap":[[5,1],[4,2],[8,3],[6,2],[7,4],[3,5]],"exportedModulesMap":[[5,2],[4,2],[8,3],[6,2],[7,6],[3,5]],"semanticDiagnosticsPerFile":[1,5,4,8,6,7,2,3]},"version":"FakeTSVersion"} //// [/src/src-dogs/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../lib/lib.es2020.full.d.ts", + "../../lib/lib.es2022.full.d.ts", "../src-types/dogconfig.d.ts", "../src-types/index.d.ts", "./dogconfig.ts", @@ -224,10 +236,14 @@ LassieDog.getDogConfig = () => LASSIE_CONFIG; ], [ "../src-types/dogconfig.d.ts" + ], + [ + "./dog.ts", + "./index.ts" ] ], "fileInfos": { - "../../lib/lib.es2020.full.d.ts": { + "../../lib/lib.es2022.full.d.ts": { "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "affectsGlobalScope": true, @@ -245,27 +261,27 @@ LassieDog.getDogConfig = () => LASSIE_CONFIG; }, "./dogconfig.ts": { "version": "1966273863-import { DogConfig } from 'src-types';\n\nexport const DOG_CONFIG: DogConfig = {\n name: 'Default dog',\n};\n", - "signature": "1966273863-import { DogConfig } from 'src-types';\n\nexport const DOG_CONFIG: DogConfig = {\n name: 'Default dog',\n};\n", + "signature": "17588480778-import { DogConfig } from 'src-types';\r\nexport declare const DOG_CONFIG: DogConfig;\r\n", "impliedFormat": 99 }, "./dog.ts": { "version": "6091345804-import { DogConfig } from 'src-types';\nimport { DOG_CONFIG } from './dogconfig.js';\n\nexport abstract class Dog {\n\n public static getCapabilities(): DogConfig {\n return DOG_CONFIG;\n }\n}\n", - "signature": "6091345804-import { DogConfig } from 'src-types';\nimport { DOG_CONFIG } from './dogconfig.js';\n\nexport abstract class Dog {\n\n public static getCapabilities(): DogConfig {\n return DOG_CONFIG;\n }\n}\n", + "signature": "22128633249-import { DogConfig } from 'src-types';\r\nexport declare abstract class Dog {\r\n static getCapabilities(): DogConfig;\r\n}\r\n", "impliedFormat": 99 }, "./lassie/lassieconfig.ts": { "version": "4440579024-import { DogConfig } from 'src-types';\n\nexport const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };\n", - "signature": "4440579024-import { DogConfig } from 'src-types';\n\nexport const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };\n", + "signature": "8131483665-import { DogConfig } from 'src-types';\r\nexport declare const LASSIE_CONFIG: DogConfig;\r\n", "impliedFormat": 99 }, "./lassie/lassiedog.ts": { "version": "-32303727812-import { Dog } from '../dog.js';\nimport { LASSIE_CONFIG } from './lassieconfig.js';\n\nexport class LassieDog extends Dog {\n protected static getDogConfig = () => LASSIE_CONFIG;\n}\n", - "signature": "-32303727812-import { Dog } from '../dog.js';\nimport { LASSIE_CONFIG } from './lassieconfig.js';\n\nexport class LassieDog extends Dog {\n protected static getDogConfig = () => LASSIE_CONFIG;\n}\n", + "signature": "-20244062422-import { Dog } from '../dog.js';\r\nexport declare class LassieDog extends Dog {\r\n protected static getDogConfig: () => import(\"../index.js\").DogConfig;\r\n}\r\n", "impliedFormat": 99 }, "./index.ts": { "version": "-15974991320-export * from 'src-types';\nexport * from './lassie/lassiedog.js';\n", - "signature": "-15974991320-export * from 'src-types';\nexport * from './lassie/lassiedog.js';\n", + "signature": "-16783836862-export * from 'src-types';\r\nexport * from './lassie/lassiedog.js';\r\n", "impliedFormat": 99 } }, @@ -299,8 +315,7 @@ LassieDog.getDogConfig = () => LASSIE_CONFIG; }, "exportedModulesMap": { "./dog.ts": [ - "../src-types/index.d.ts", - "./dogconfig.ts" + "../src-types/index.d.ts" ], "./dogconfig.ts": [ "../src-types/index.d.ts" @@ -314,14 +329,14 @@ LassieDog.getDogConfig = () => LASSIE_CONFIG; ], "./lassie/lassiedog.ts": [ "./dog.ts", - "./lassie/lassieconfig.ts" + "./index.ts" ], "../src-types/index.d.ts": [ "../src-types/dogconfig.d.ts" ] }, "semanticDiagnosticsPerFile": [ - "../../lib/lib.es2020.full.d.ts", + "../../lib/lib.es2022.full.d.ts", "./dog.ts", "./dogconfig.ts", "./index.ts", @@ -332,7 +347,7 @@ LassieDog.getDogConfig = () => LASSIE_CONFIG; ] }, "version": "FakeTSVersion", - "size": 2019 + "size": 2712 } //// [/src/src-types/dogconfig.d.ts] @@ -354,13 +369,13 @@ export * from './dogconfig.js'; //// [/src/src-types/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.es2020.full.d.ts","./dogconfig.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-5575793279-export interface DogConfig {\n name: string;\n}","impliedFormat":99},{"version":"-6189272282-export * from './dogconfig.js';","impliedFormat":99}],"options":{"composite":true,"declaration":true,"module":100},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.es2022.full.d.ts","./dogconfig.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-5575793279-export interface DogConfig {\n name: string;\n}","signature":"-2632060142-export interface DogConfig {\r\n name: string;\r\n}\r\n","impliedFormat":99},{"version":"-6189272282-export * from './dogconfig.js';","signature":"-5608794531-export * from './dogconfig.js';\r\n","impliedFormat":99}],"options":{"composite":true,"declaration":true,"module":100},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/src-types/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../lib/lib.es2020.full.d.ts", + "../../lib/lib.es2022.full.d.ts", "./dogconfig.ts", "./index.ts" ], @@ -370,7 +385,7 @@ export * from './dogconfig.js'; ] ], "fileInfos": { - "../../lib/lib.es2020.full.d.ts": { + "../../lib/lib.es2022.full.d.ts": { "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "affectsGlobalScope": true, @@ -378,12 +393,12 @@ export * from './dogconfig.js'; }, "./dogconfig.ts": { "version": "-5575793279-export interface DogConfig {\n name: string;\n}", - "signature": "-5575793279-export interface DogConfig {\n name: string;\n}", + "signature": "-2632060142-export interface DogConfig {\r\n name: string;\r\n}\r\n", "impliedFormat": 99 }, "./index.ts": { "version": "-6189272282-export * from './dogconfig.js';", - "signature": "-6189272282-export * from './dogconfig.js';", + "signature": "-5608794531-export * from './dogconfig.js';\r\n", "impliedFormat": 99 } }, @@ -403,12 +418,12 @@ export * from './dogconfig.js'; ] }, "semanticDiagnosticsPerFile": [ - "../../lib/lib.es2020.full.d.ts", + "../../lib/lib.es2022.full.d.ts", "./dogconfig.ts", "./index.ts" ] }, "version": "FakeTSVersion", - "size": 891 + "size": 1038 } diff --git a/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-resolve-correctly.js b/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-resolve-correctly.js index 268854ffbb4..b1b2feb8dd3 100644 --- a/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-resolve-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-resolve-correctly.js @@ -116,24 +116,24 @@ export function getVar(): keyof typeof variable { Output:: /lib/tsc -b /src --verbose -[12:00:00 AM] Projects in this build: +[12:00:19 AM] Projects in this build: * src/solution/common/tsconfig.json * src/solution/sub-project/tsconfig.json * src/solution/sub-project-2/tsconfig.json * src/solution/tsconfig.json * src/tsconfig.json -[12:00:00 AM] Project 'src/solution/common/tsconfig.json' is out of date because output file 'src/lib/solution/common/nominal.js' does not exist +[12:00:20 AM] Project 'src/solution/common/tsconfig.json' is out of date because output file 'src/lib/solution/common/nominal.js' does not exist -[12:00:00 AM] Building project '/src/solution/common/tsconfig.json'... +[12:00:21 AM] Building project '/src/solution/common/tsconfig.json'... -[12:00:00 AM] Project 'src/solution/sub-project/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project/index.js' does not exist +[12:00:29 AM] Project 'src/solution/sub-project/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project/index.js' does not exist -[12:00:00 AM] Building project '/src/solution/sub-project/tsconfig.json'... +[12:00:30 AM] Building project '/src/solution/sub-project/tsconfig.json'... -[12:00:00 AM] Project 'src/solution/sub-project-2/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project-2/index.js' does not exist +[12:00:36 AM] Project 'src/solution/sub-project-2/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project-2/index.js' does not exist -[12:00:00 AM] Building project '/src/solution/sub-project-2/tsconfig.json'... +[12:00:37 AM] Building project '/src/solution/sub-project-2/tsconfig.json'... exitCode:: ExitStatus.Success @@ -150,7 +150,7 @@ exports.__esModule = true; //// [/src/lib/solution/common/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","../../../solution/common/nominal.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n"],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","../../../solution/common/nominal.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},{"version":"-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n","signature":"-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/lib/solution/common/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -167,7 +167,7 @@ exports.__esModule = true; }, "../../../solution/common/nominal.ts": { "version": "-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n", - "signature": "-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n" + "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" } }, "options": { @@ -184,7 +184,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 1097 + "size": 1236 } //// [/src/lib/solution/sub-project/index.d.ts] @@ -198,7 +198,7 @@ exports.__esModule = true; //// [/src/lib/solution/sub-project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","../common/nominal.d.ts","../../../solution/sub-project/index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n"],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","../common/nominal.d.ts","../../../solution/sub-project/index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n",{"version":"-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n","signature":"-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/lib/solution/sub-project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -225,7 +225,7 @@ exports.__esModule = true; }, "../../../solution/sub-project/index.ts": { "version": "-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n", - "signature": "-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n" + "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" } }, "options": { @@ -251,7 +251,7 @@ exports.__esModule = true; ] }, "version": "FakeTSVersion", - "size": 1281 + "size": 1434 } //// [/src/lib/solution/sub-project-2/index.d.ts] @@ -277,7 +277,7 @@ exports.getVar = getVar; //// [/src/lib/solution/sub-project-2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../../solution/sub-project-2/index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n","-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n"],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","../common/nominal.d.ts","../sub-project/index.d.ts","../../../solution/sub-project-2/index.ts"],"fileInfos":[{"version":"-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n","affectsGlobalScope":true},"-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n","-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n",{"version":"-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n","signature":"881159974-import { MyNominal } from '../sub-project/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n"}],"options":{"composite":true,"outDir":"../..","rootDir":"../../..","skipLibCheck":true},"fileIdsList":[[2],[3]],"referencedMap":[[3,1],[4,2]],"exportedModulesMap":[[3,1],[4,2]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/lib/solution/sub-project-2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -312,7 +312,7 @@ exports.getVar = getVar; }, "../../../solution/sub-project-2/index.ts": { "version": "-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n", - "signature": "-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n" + "signature": "881159974-import { MyNominal } from '../sub-project/index';\r\ndeclare const variable: {\r\n key: MyNominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" } }, "options": { @@ -345,6 +345,6 @@ exports.getVar = getVar; ] }, "version": "FakeTSVersion", - "size": 1539 + "size": 1761 } diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental-discrepancies.js new file mode 100644 index 00000000000..86eb6bdb396 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental-discrepancies.js @@ -0,0 +1,10 @@ +0:: no-change-run +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "../src/main.ts": [ + "../shared/types/db.ts" + ] +} +Clean: {} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental-discrepancies.js new file mode 100644 index 00000000000..cab34fb1d08 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental-discrepancies.js @@ -0,0 +1,20 @@ +1:: Fix error +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "../src/main.ts": [ + "../shared/types/db.ts" + ] +} +Clean: {} +2:: no-change-run +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "../src/main.ts": [ + "../shared/types/db.ts" + ] +} +Clean: {} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js b/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js index d8f418deee4..2e60f138d17 100644 --- a/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js @@ -15,13 +15,27 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/src/first/first_PART1.ts] +interface TheFirst { + none: any; +} + +const s = "Hello, world"; + +interface NoJsForHereEither { + none: any; +} + +console.log(s); //// [/src/first/first_part2.ts] +console.log(f()); //// [/src/first/first_part3.ts] - +function f() { + return "JS does hoists"; +} //// [/src/first/tsconfig.json] { @@ -86,6 +100,8 @@ class C { //// [/src/third/third_part1.ts] +var c = new C(); +c.doSomething(); //// [/src/third/tsconfig.json] diff --git a/tests/baselines/reference/tsbuild/outFile/clean-projects.js b/tests/baselines/reference/tsbuild/outFile/clean-projects.js index 8b3a08c3f9d..086dc3f5822 100644 --- a/tests/baselines/reference/tsbuild/outFile/clean-projects.js +++ b/tests/baselines/reference/tsbuild/outFile/clean-projects.js @@ -1,45 +1,234 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/2/second-output.d.ts] - +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] - +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.js] - +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] - +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/2/second-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +====================================================================== + +//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../second", + "sourceFiles": [ + "../second/second_part1.ts", + "../second/second_part2.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 285, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 100, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 255 +} //// [/src/first/bin/first-output.d.ts] - +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] - +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] - +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +====================================================================== + +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "..", + "sourceFiles": [ + "../first_PART1.ts", + "../first_part2.ts", + "../first_part3.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 252 +} //// [/src/first/first_PART1.ts] +interface TheFirst { + none: any; +} + +const s = "Hello, world"; + +interface NoJsForHereEither { + none: any; +} + +console.log(s); //// [/src/first/first_part2.ts] +console.log(f()); //// [/src/first/first_part3.ts] - +function f() { + return "JS does hoists"; +} //// [/src/first/tsconfig.json] { @@ -64,9 +253,25 @@ Input:: //// [/src/second/second_part1.ts] +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} //// [/src/second/second_part2.ts] +class C { + doSomething() { + console.log("something got done"); + } +} //// [/src/second/tsconfig.json] @@ -88,21 +293,217 @@ Input:: //// [/src/third/thirdjs/output/third-output.d.ts] - +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +declare var c: C; +//# sourceMappingURL=third-output.d.ts.map //// [/src/third/thirdjs/output/third-output.d.ts.map] - +{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} //// [/src/third/thirdjs/output/third-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +var c = new C(); +c.doSomething(); +//# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] - +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-110):: ../../../first/bin/first-output.js texts:: 1 +>>-------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +prepend: (110-395):: ../../../2/second-output.js texts:: 1 +>>-------------------------------------------------------------------- +text: (110-395) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +text: (395-431) +var c = new C(); +c.doSomething(); + +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-157):: ../../../first/bin/first-output.d.ts texts:: 1 +>>-------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +prepend: (157-257):: ../../../2/second-output.d.ts texts:: 1 +>>-------------------------------------------------------------------- +text: (157-257) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +text: (257-276) +declare var c: C; + +====================================================================== + +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../..", + "sourceFiles": [ + "../../third_part1.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "prepend", + "data": "../../../first/bin/first-output.js", + "texts": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + { + "pos": 110, + "end": 395, + "kind": "prepend", + "data": "../../../2/second-output.js", + "texts": [ + { + "pos": 110, + "end": 395, + "kind": "text" + } + ] + }, + { + "pos": 395, + "end": 431, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "prepend", + "data": "../../../first/bin/first-output.d.ts", + "texts": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + }, + { + "pos": 157, + "end": 257, + "kind": "prepend", + "data": "../../../2/second-output.d.ts", + "texts": [ + { + "pos": 157, + "end": 257, + "kind": "text" + } + ] + }, + { + "pos": 257, + "end": 276, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 720 +} //// [/src/third/third_part1.ts] +var c = new C(); +c.doSomething(); //// [/src/third/tsconfig.json] diff --git a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js index 250a854a535..408ca5609ad 100644 --- a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js @@ -1,45 +1,234 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/2/second-output.d.ts] - +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] - +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.js] - +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] - +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/2/second-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +====================================================================== + +//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../second", + "sourceFiles": [ + "../second/second_part1.ts", + "../second/second_part2.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 285, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 100, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 255 +} //// [/src/first/bin/first-output.d.ts] - +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] - +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] - +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +====================================================================== + +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "..", + "sourceFiles": [ + "../first_PART1.ts", + "../first_part2.ts", + "../first_part3.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 252 +} //// [/src/first/first_PART1.ts] +interface TheFirst { + none: any; +} + +const s = "Hello, world"; + +interface NoJsForHereEither { + none: any; +} + +console.log(s); //// [/src/first/first_part2.ts] +console.log(f()); //// [/src/first/first_part3.ts] - +function f() { + return "JS does hoists"; +} //// [/src/first/tsconfig.json] { @@ -64,9 +253,25 @@ Input:: //// [/src/second/second_part1.ts] +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} //// [/src/second/second_part2.ts] +class C { + doSomething() { + console.log("something got done"); + } +} //// [/src/second/tsconfig.json] @@ -88,21 +293,217 @@ Input:: //// [/src/third/thirdjs/output/third-output.d.ts] - +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +declare var c: C; +//# sourceMappingURL=third-output.d.ts.map //// [/src/third/thirdjs/output/third-output.d.ts.map] - +{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} //// [/src/third/thirdjs/output/third-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +var c = new C(); +c.doSomething(); +//# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] - +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-110):: ../../../first/bin/first-output.js texts:: 1 +>>-------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +prepend: (110-395):: ../../../2/second-output.js texts:: 1 +>>-------------------------------------------------------------------- +text: (110-395) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +text: (395-431) +var c = new C(); +c.doSomething(); + +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-157):: ../../../first/bin/first-output.d.ts texts:: 1 +>>-------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +prepend: (157-257):: ../../../2/second-output.d.ts texts:: 1 +>>-------------------------------------------------------------------- +text: (157-257) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +text: (257-276) +declare var c: C; + +====================================================================== + +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../..", + "sourceFiles": [ + "../../third_part1.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "prepend", + "data": "../../../first/bin/first-output.js", + "texts": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + { + "pos": 110, + "end": 395, + "kind": "prepend", + "data": "../../../2/second-output.js", + "texts": [ + { + "pos": 110, + "end": 395, + "kind": "text" + } + ] + }, + { + "pos": 395, + "end": 431, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "prepend", + "data": "../../../first/bin/first-output.d.ts", + "texts": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + }, + { + "pos": 157, + "end": 257, + "kind": "prepend", + "data": "../../../2/second-output.d.ts", + "texts": [ + { + "pos": 157, + "end": 257, + "kind": "text" + } + ] + }, + { + "pos": 257, + "end": 276, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 720 +} //// [/src/third/third_part1.ts] +var c = new C(); +c.doSomething(); //// [/src/third/tsconfig.json] diff --git a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js index e4f98012bfa..8903f45aeb4 100644 --- a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js +++ b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/first_PART1.js' does not exist +[12:00:15 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/first_PART1.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:16 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/second/second_part1.js' does not exist +[12:00:31 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/second/second_part1.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:32 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/third_part1.js' does not exist +[12:00:43 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/third_part1.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:44 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -202,7 +202,7 @@ function f() { {"version":3,"file":"first_part3.js","sourceRoot":"","sources":["first_part3.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./first_part1.ts","./first_part2.ts","./first_part3.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-17207381411-interface TheFirst {\r\n none: any;\r\n}\r\n\r\nconst s = \"Hello, world\";\r\n\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n\r\nconsole.log(s);\r\n","affectsGlobalScope":true},{"version":"4973778178-console.log(f());\r\n","affectsGlobalScope":true},{"version":"6202806249-function f() {\r\n return \"JS does hoists\";\r\n}","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./first_part1.ts","./first_part2.ts","./first_part3.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-17207381411-interface TheFirst {\r\n none: any;\r\n}\r\n\r\nconst s = \"Hello, world\";\r\n\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n\r\nconsole.log(s);\r\n","signature":"-12382020913-interface TheFirst {\r\n none: any;\r\n}\r\ndeclare const s = \"Hello, world\";\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n","affectsGlobalScope":true},{"version":"4973778178-console.log(f());\r\n","signature":"5381-","affectsGlobalScope":true},{"version":"6202806249-function f() {\r\n return \"JS does hoists\";\r\n}","signature":"-5732730923-declare function f(): string;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/first/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -221,17 +221,17 @@ function f() { }, "./first_part1.ts": { "version": "-17207381411-interface TheFirst {\r\n none: any;\r\n}\r\n\r\nconst s = \"Hello, world\";\r\n\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n\r\nconsole.log(s);\r\n", - "signature": "-17207381411-interface TheFirst {\r\n none: any;\r\n}\r\n\r\nconst s = \"Hello, world\";\r\n\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n\r\nconsole.log(s);\r\n", + "signature": "-12382020913-interface TheFirst {\r\n none: any;\r\n}\r\ndeclare const s = \"Hello, world\";\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n", "affectsGlobalScope": true }, "./first_part2.ts": { "version": "4973778178-console.log(f());\r\n", - "signature": "4973778178-console.log(f());\r\n", + "signature": "5381-", "affectsGlobalScope": true }, "./first_part3.ts": { "version": "6202806249-function f() {\r\n return \"JS does hoists\";\r\n}", - "signature": "6202806249-function f() {\r\n return \"JS does hoists\";\r\n}", + "signature": "-5732730923-declare function f(): string;\r\n", "affectsGlobalScope": true } }, @@ -253,7 +253,7 @@ function f() { ] }, "version": "FakeTSVersion", - "size": 1214 + "size": 1464 } //// [/src/second/second_part1.d.ts] @@ -303,7 +303,7 @@ var C = (function () { {"version":3,"file":"second_part2.js","sourceRoot":"","sources":["second_part2.ts"],"names":[],"mappings":"AAAA;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/second/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./second_part1.ts","./second_part2.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-21603042336-namespace N {\r\n // Comment text\r\n}\r\n\r\nnamespace N {\r\n function f() {\r\n console.log('testing');\r\n }\r\n\r\n f();\r\n}\r\n","affectsGlobalScope":true},{"version":"9339262372-class C {\r\n doSomething() {\r\n console.log(\"something got done\");\r\n }\r\n}\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./second_part1.ts","./second_part2.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-21603042336-namespace N {\r\n // Comment text\r\n}\r\n\r\nnamespace N {\r\n function f() {\r\n console.log('testing');\r\n }\r\n\r\n f();\r\n}\r\n","signature":"-4200194009-declare namespace N {\r\n}\r\ndeclare namespace N {\r\n}\r\n","affectsGlobalScope":true},{"version":"9339262372-class C {\r\n doSomething() {\r\n console.log(\"something got done\");\r\n }\r\n}\r\n","signature":"1950347108-declare class C {\r\n doSomething(): void;\r\n}\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/second/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -321,12 +321,12 @@ var C = (function () { }, "./second_part1.ts": { "version": "-21603042336-namespace N {\r\n // Comment text\r\n}\r\n\r\nnamespace N {\r\n function f() {\r\n console.log('testing');\r\n }\r\n\r\n f();\r\n}\r\n", - "signature": "-21603042336-namespace N {\r\n // Comment text\r\n}\r\n\r\nnamespace N {\r\n function f() {\r\n console.log('testing');\r\n }\r\n\r\n f();\r\n}\r\n", + "signature": "-4200194009-declare namespace N {\r\n}\r\ndeclare namespace N {\r\n}\r\n", "affectsGlobalScope": true }, "./second_part2.ts": { "version": "9339262372-class C {\r\n doSomething() {\r\n console.log(\"something got done\");\r\n }\r\n}\r\n", - "signature": "9339262372-class C {\r\n doSomething() {\r\n console.log(\"something got done\");\r\n }\r\n}\r\n", + "signature": "1950347108-declare class C {\r\n doSomething(): void;\r\n}\r\n", "affectsGlobalScope": true } }, @@ -348,7 +348,7 @@ var C = (function () { ] }, "version": "FakeTSVersion", - "size": 1174 + "size": 1341 } //// [/src/third/third_part1.d.ts] @@ -367,7 +367,7 @@ c.doSomething(); {"version":3,"file":"third_part1.js","sourceRoot":"","sources":["third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../first/first_part1.d.ts","../first/first_part2.d.ts","../first/first_part3.d.ts","../second/second_part1.d.ts","../second/second_part2.d.ts","./third_part1.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-17939996161-interface TheFirst {\r\n none: any;\r\n}\r\ndeclare const s = \"Hello, world\";\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n//# sourceMappingURL=first_PART1.d.ts.map","affectsGlobalScope":true},"-2054710634-//# sourceMappingURL=first_part2.d.ts.map",{"version":"-4577888121-declare function f(): string;\r\n//# sourceMappingURL=first_part3.d.ts.map","affectsGlobalScope":true},{"version":"-3134340341-declare namespace N {\r\n}\r\ndeclare namespace N {\r\n}\r\n//# sourceMappingURL=second_part1.d.ts.map","affectsGlobalScope":true},{"version":"6579734441-declare class C {\r\n doSomething(): void;\r\n}\r\n//# sourceMappingURL=second_part2.d.ts.map","affectsGlobalScope":true},{"version":"10470273651-var c = new C();\r\nc.doSomething();\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../first/first_part1.d.ts","../first/first_part2.d.ts","../first/first_part3.d.ts","../second/second_part1.d.ts","../second/second_part2.d.ts","./third_part1.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-17939996161-interface TheFirst {\r\n none: any;\r\n}\r\ndeclare const s = \"Hello, world\";\r\ninterface NoJsForHereEither {\r\n none: any;\r\n}\r\n//# sourceMappingURL=first_PART1.d.ts.map","affectsGlobalScope":true},"-2054710634-//# sourceMappingURL=first_part2.d.ts.map",{"version":"-4577888121-declare function f(): string;\r\n//# sourceMappingURL=first_part3.d.ts.map","affectsGlobalScope":true},{"version":"-3134340341-declare namespace N {\r\n}\r\ndeclare namespace N {\r\n}\r\n//# sourceMappingURL=second_part1.d.ts.map","affectsGlobalScope":true},{"version":"6579734441-declare class C {\r\n doSomething(): void;\r\n}\r\n//# sourceMappingURL=second_part2.d.ts.map","affectsGlobalScope":true},{"version":"10470273651-var c = new C();\r\nc.doSomething();\r\n","signature":"2394638288-declare var c: C;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":0,"removeComments":true,"skipDefaultLibCheck":true,"sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7]},"version":"FakeTSVersion"} //// [/src/third/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -413,7 +413,7 @@ c.doSomething(); }, "./third_part1.ts": { "version": "10470273651-var c = new C();\r\nc.doSomething();\r\n", - "signature": "10470273651-var c = new C();\r\nc.doSomething();\r\n", + "signature": "2394638288-declare var c: C;\r\n", "affectsGlobalScope": true } }, @@ -439,6 +439,6 @@ c.doSomething(); ] }, "version": "FakeTSVersion", - "size": 1764 + "size": 1811 } diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js index ffa2d94ede7..c7836fc59c6 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --i --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -575,20 +575,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:40 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:41 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:42 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:50 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:51 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:52 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -726,20 +726,20 @@ console.log(s);console.log(s); Output:: /lib/tsc --b /src/third --verbose --incremental -[12:07:00 AM] Projects in this build: +[12:00:58 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:59 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:00 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:08 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.tsbuildinfo' is older than newest input 'src/first' +[12:01:09 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.tsbuildinfo' is older than newest input 'src/first' -[12:07:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:10 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js index 4a0c1b3eba6..eba378c6595 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js @@ -25,17 +25,99 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] - +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.js] - +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] - +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.tsbuildinfo] {"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/2/second-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +====================================================================== + +//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../second", + "sourceFiles": [ + "../second/second_part1.ts", + "../second/second_part2.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 285, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 100, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 255 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -48,17 +130,83 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] - +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] - +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.tsbuildinfo] {"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +====================================================================== + +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "..", + "sourceFiles": [ + "../first_PART1.ts", + "../first_part2.ts", + "../first_part3.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 252 +} + //// [/src/first/first_PART1.ts] interface TheFirst { none: any; @@ -164,81 +312,15 @@ declare var c: C; //# sourceMappingURL=third-output.d.ts.map //// [/src/third/thirdjs/output/third-output.d.ts.map] - +{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} //// [/src/third/thirdjs/output/third-output.js] - - -//// [/src/third/thirdjs/output/third-output.js.map] - - -//// [/src/third/thirdjs/output/third-output.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSVersion"} - -//// [/src/third/third_part1.ts] -var c = new C(); -c.doSomething(); - - -//// [/src/third/tsconfig.json] -{ - "compilerOptions": { - "target": "es5", - "composite": true, - "removeComments": true, - "strict": false, - "sourceMap": true, - "declarationMap": true, - "declaration": true, - "outFile": "./thirdjs/output/third-output.js", - "skipDefaultLibCheck": true, - }, - "files": [ - "third_part1.ts" - ], - "references": [ - { "path": "../first", "prepend": true }, - { "path": "../second", "prepend": true }, - ] +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; } - - - - -Output:: -/lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: - * src/first/tsconfig.json - * src/second/tsconfig.json - * src/third/tsconfig.json - -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/first/tsconfig.json'... - -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/second/tsconfig.json'... - -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/third/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/2/second-output.d.ts] file written with same contents -//// [/src/2/second-output.d.ts.map] file written with same contents -//// [/src/2/second-output.js] file written with same contents -//// [/src/2/second-output.js.map] file written with same contents -//// [/src/2/second-output.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} - -//// [/src/2/second-output.tsbuildinfo.baseline.txt] -====================================================================== -File:: /src/2/second-output.js ----------------------------------------------------------------------- -text: (0-285) var N; (function (N) { function f() { @@ -254,126 +336,15 @@ var C = (function () { }; return C; }()); +var c = new C(); +c.doSomething(); +//# sourceMappingURL=third-output.js.map -====================================================================== -====================================================================== -File:: /src/2/second-output.d.ts ----------------------------------------------------------------------- -text: (0-100) -declare namespace N { -} -declare namespace N { -} -declare class C { - doSomething(): void; -} +//// [/src/third/thirdjs/output/third-output.js.map] +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} -====================================================================== - -//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] -{ - "bundle": { - "commonSourceDirectory": "../second", - "sourceFiles": [ - "../second/second_part1.ts", - "../second/second_part2.ts" - ], - "js": { - "sections": [ - { - "pos": 0, - "end": 285, - "kind": "text" - } - ] - }, - "dts": { - "sections": [ - { - "pos": 0, - "end": 100, - "kind": "text" - } - ] - } - }, - "version": "FakeTSCurrentVersion", - "size": 262 -} - -//// [/src/first/bin/first-output.d.ts] file written with same contents -//// [/src/first/bin/first-output.d.ts.map] file written with same contents -//// [/src/first/bin/first-output.js] file written with same contents -//// [/src/first/bin/first-output.js.map] file written with same contents -//// [/src/first/bin/first-output.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} - -//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] -====================================================================== -File:: /src/first/bin/first-output.js ----------------------------------------------------------------------- -text: (0-110) -var s = "Hello, world"; -console.log(s); -console.log(f()); -function f() { - return "JS does hoists"; -} - -====================================================================== -====================================================================== -File:: /src/first/bin/first-output.d.ts ----------------------------------------------------------------------- -text: (0-157) -interface TheFirst { - none: any; -} -declare const s = "Hello, world"; -interface NoJsForHereEither { - none: any; -} -declare function f(): string; - -====================================================================== - -//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] -{ - "bundle": { - "commonSourceDirectory": "..", - "sourceFiles": [ - "../first_PART1.ts", - "../first_part2.ts", - "../first_part3.ts" - ], - "js": { - "sections": [ - { - "pos": 0, - "end": 110, - "kind": "text" - } - ] - }, - "dts": { - "sections": [ - { - "pos": 0, - "end": 157, - "kind": "text" - } - ] - } - }, - "version": "FakeTSCurrentVersion", - "size": 259 -} - -//// [/src/third/thirdjs/output/third-output.d.ts] file written with same contents -//// [/src/third/thirdjs/output/third-output.d.ts.map] file written with same contents -//// [/src/third/thirdjs/output/third-output.js] file written with same contents -//// [/src/third/thirdjs/output/third-output.js.map] file written with same contents //// [/src/third/thirdjs/output/third-output.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} +{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSVersion"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] ====================================================================== @@ -448,6 +419,227 @@ declare var c: C; ====================================================================== +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../..", + "sourceFiles": [ + "../../third_part1.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "prepend", + "data": "../../../first/bin/first-output.js", + "texts": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + { + "pos": 110, + "end": 395, + "kind": "prepend", + "data": "../../../2/second-output.js", + "texts": [ + { + "pos": 110, + "end": 395, + "kind": "text" + } + ] + }, + { + "pos": 395, + "end": 431, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "prepend", + "data": "../../../first/bin/first-output.d.ts", + "texts": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + }, + { + "pos": 157, + "end": 257, + "kind": "prepend", + "data": "../../../2/second-output.d.ts", + "texts": [ + { + "pos": 157, + "end": 257, + "kind": "text" + } + ] + }, + { + "pos": 257, + "end": 276, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 720 +} + +//// [/src/third/third_part1.ts] +var c = new C(); +c.doSomething(); + + +//// [/src/third/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": false, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "./thirdjs/output/third-output.js", + "skipDefaultLibCheck": true, + }, + "files": [ + "third_part1.ts" + ], + "references": [ + { "path": "../first", "prepend": true }, + { "path": "../second", "prepend": true }, + ] +} + + + + +Output:: +/lib/tsc --b /src/third --verbose +[12:00:38 AM] Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +[12:00:39 AM] Project 'src/first/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:40 AM] Building project '/src/first/tsconfig.json'... + +[12:00:48 AM] Project 'src/second/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:49 AM] Building project '/src/second/tsconfig.json'... + +[12:00:57 AM] Project 'src/third/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:58 AM] Building project '/src/third/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/2/second-output.d.ts] file written with same contents +//// [/src/2/second-output.d.ts.map] file written with same contents +//// [/src/2/second-output.js] file written with same contents +//// [/src/2/second-output.js.map] file written with same contents +//// [/src/2/second-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} + +//// [/src/2/second-output.tsbuildinfo.baseline.txt] file written with same contents +//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../second", + "sourceFiles": [ + "../second/second_part1.ts", + "../second/second_part2.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 285, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 100, + "kind": "text" + } + ] + } + }, + "version": "FakeTSCurrentVersion", + "size": 262 +} + +//// [/src/first/bin/first-output.d.ts] file written with same contents +//// [/src/first/bin/first-output.d.ts.map] file written with same contents +//// [/src/first/bin/first-output.js] file written with same contents +//// [/src/first/bin/first-output.js.map] file written with same contents +//// [/src/first/bin/first-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} + +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] file written with same contents +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "..", + "sourceFiles": [ + "../first_PART1.ts", + "../first_part2.ts", + "../first_part3.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + } + }, + "version": "FakeTSCurrentVersion", + "size": 259 +} + +//// [/src/third/thirdjs/output/third-output.d.ts] file written with same contents +//// [/src/third/thirdjs/output/third-output.d.ts.map] file written with same contents +//// [/src/third/thirdjs/output/third-output.js] file written with same contents +//// [/src/third/thirdjs/output/third-output.js.map] file written with same contents +//// [/src/third/thirdjs/output/third-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSCurrentVersion"} + +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] file written with same contents //// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] { "bundle": { diff --git a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js index 61366ed7aaa..9eb72aa4711 100644 --- a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js +++ b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js index d2077269d9b..1b9d7357ac1 100644 --- a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js +++ b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js @@ -51,6 +51,73 @@ var C = (function () { //// [/src/2/second-output.tsbuildinfo] {"bundle":{"commonSourceDirectory":"../second","sourceFiles":["../second/second_part1.ts","../second/second_part2.ts"],"js":{"sections":[{"pos":0,"end":285,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":100,"kind":"text"}]}},"version":"FakeTSVersion"} +//// [/src/2/second-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +====================================================================== + +//// [/src/2/second-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../second", + "sourceFiles": [ + "../second/second_part1.ts", + "../second/second_part2.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 285, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 100, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 255 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -63,13 +130,79 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] - +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] - +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +====================================================================== + +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "..", + "sourceFiles": [ + "../first_PART1.ts", + "../first_part2.ts", + "../first_part3.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 110, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 157, + "kind": "text" + } + ] + } + }, + "version": "FakeTSVersion", + "size": 252 +} //// [/src/first/first_PART1.ts] interface TheFirst { @@ -117,9 +250,25 @@ function f() { //// [/src/second/second_part1.ts] +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} //// [/src/second/second_part2.ts] +class C { + doSomething() { + console.log("something got done"); + } +} //// [/src/second/tsconfig.json] @@ -194,124 +343,6 @@ c.doSomething(); //// [/src/third/thirdjs/output/third-output.tsbuildinfo] {"bundle":{"commonSourceDirectory":"../..","sourceFiles":["../../third_part1.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"prepend","data":"../../../first/bin/first-output.js","texts":[{"pos":0,"end":110,"kind":"text"}]},{"pos":110,"end":395,"kind":"prepend","data":"../../../2/second-output.js","texts":[{"pos":110,"end":395,"kind":"text"}]},{"pos":395,"end":431,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"prepend","data":"../../../first/bin/first-output.d.ts","texts":[{"pos":0,"end":157,"kind":"text"}]},{"pos":157,"end":257,"kind":"prepend","data":"../../../2/second-output.d.ts","texts":[{"pos":157,"end":257,"kind":"text"}]},{"pos":257,"end":276,"kind":"text"}]}},"version":"FakeTSVersion"} -//// [/src/third/third_part1.ts] - - -//// [/src/third/tsconfig.json] -{ - "compilerOptions": { - "target": "es5", - "composite": true, - "removeComments": true, - "strict": false, - "sourceMap": true, - "declarationMap": true, - "declaration": true, - "outFile": "./thirdjs/output/third-output.js", - "skipDefaultLibCheck": true, - }, - "files": [ - "third_part1.ts" - ], - "references": [ - { "path": "../first", "prepend": true }, - { "path": "../second", "prepend": true }, - ] -} - - - - -Output:: -/lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: - * src/first/tsconfig.json - * src/second/tsconfig.json - * src/third/tsconfig.json - -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.tsbuildinfo' does not exist - -[12:00:00 AM] Building project '/src/first/tsconfig.json'... - -[12:00:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' - -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed - -[12:00:00 AM] Updating output of project '/src/third/tsconfig.json'... - -[12:00:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/first/bin/first-output.d.ts] file written with same contents -//// [/src/first/bin/first-output.d.ts.map] file written with same contents -//// [/src/first/bin/first-output.js] file written with same contents -//// [/src/first/bin/first-output.js.map] file written with same contents -//// [/src/first/bin/first-output.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSVersion"} - -//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] -====================================================================== -File:: /src/first/bin/first-output.js ----------------------------------------------------------------------- -text: (0-110) -var s = "Hello, world"; -console.log(s); -console.log(f()); -function f() { - return "JS does hoists"; -} - -====================================================================== -====================================================================== -File:: /src/first/bin/first-output.d.ts ----------------------------------------------------------------------- -text: (0-157) -interface TheFirst { - none: any; -} -declare const s = "Hello, world"; -interface NoJsForHereEither { - none: any; -} -declare function f(): string; - -====================================================================== - -//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] -{ - "bundle": { - "commonSourceDirectory": "..", - "sourceFiles": [ - "../first_PART1.ts", - "../first_part2.ts", - "../first_part3.ts" - ], - "js": { - "sections": [ - { - "pos": 0, - "end": 110, - "kind": "text" - } - ] - }, - "dts": { - "sections": [ - { - "pos": 0, - "end": 157, - "kind": "text" - } - ] - } - }, - "version": "FakeTSVersion", - "size": 252 -} - -//// [/src/third/thirdjs/output/third-output.tsbuildinfo] file written with same contents //// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] ====================================================================== File:: /src/third/thirdjs/output/third-output.js @@ -467,3 +498,71 @@ declare var c: C; "size": 720 } +//// [/src/third/third_part1.ts] +var c = new C(); +c.doSomething(); + + +//// [/src/third/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": false, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "./thirdjs/output/third-output.js", + "skipDefaultLibCheck": true, + }, + "files": [ + "third_part1.ts" + ], + "references": [ + { "path": "../first", "prepend": true }, + { "path": "../second", "prepend": true }, + ] +} + + + + +Output:: +/lib/tsc --b /src/third --verbose +[12:00:39 AM] Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +[12:00:40 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.tsbuildinfo' does not exist + +[12:00:41 AM] Building project '/src/first/tsconfig.json'... + +[12:00:49 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' + +[12:00:50 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +[12:00:51 AM] Updating output of project '/src/third/tsconfig.json'... + +[12:00:54 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/first/bin/first-output.d.ts] file written with same contents +//// [/src/first/bin/first-output.d.ts.map] file written with same contents +//// [/src/first/bin/first-output.js] file written with same contents +//// [/src/first/bin/first-output.js.map] file written with same contents +//// [/src/first/bin/first-output.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"..","sourceFiles":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"js":{"sections":[{"pos":0,"end":110,"kind":"text"}]},"dts":{"sections":[{"pos":0,"end":157,"kind":"text"}]}},"version":"FakeTSVersion"} + +//// [/src/first/bin/first-output.tsbuildinfo.baseline.txt] file written with same contents +//// [/src/first/bin/first-output.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/third/thirdjs/output/third-output.d.ts] file changed its modified time +//// [/src/third/thirdjs/output/third-output.d.ts.map] file changed its modified time +//// [/src/third/thirdjs/output/third-output.js] file changed its modified time +//// [/src/third/thirdjs/output/third-output.js.map] file changed its modified time +//// [/src/third/thirdjs/output/third-output.tsbuildinfo] file written with same contents +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.baseline.txt] file written with same contents +//// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/baseline-sectioned-sourcemaps.js index 8e52089769e..3c8553b67e9 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/baseline-sectioned-sourcemaps.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:07 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:08 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:17 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:18 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:27 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:28 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -1904,20 +1904,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:45 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:46 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:47 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:55 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:00:56 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:57 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -3219,22 +3219,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:11 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:12 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:20 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:21 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:22 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:27 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/declarationMap-and-sourceMap-disabled.js b/tests/baselines/reference/tsbuild/outfile-concat/declarationMap-and-sourceMap-disabled.js index a6424f11e4d..1ac4d105768 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/declarationMap-and-sourceMap-disabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/declarationMap-and-sourceMap-disabled.js @@ -129,22 +129,22 @@ class C { Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:11 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:12 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:21 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:22 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:31 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:32 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-all-projects.js index 7873788adf6..e5e1dda5837 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-all-projects.js @@ -137,22 +137,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:10 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:11 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:20 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:21 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:30 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:31 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -2685,20 +2685,20 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:48 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:49 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:50 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:58 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:00:59 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:00 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -4603,22 +4603,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:13 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:14 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:15 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:23 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:24 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:25 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:30 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -6102,22 +6102,22 @@ function forfirstfirst_PART1Rest() { }console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:10:00 AM] Projects in this build: +[12:01:39 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:10:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:40 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:10:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:41 AM] Building project '/src/first/tsconfig.json'... -[12:10:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:49 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:10:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:50 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:10:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:51 AM] Updating output of project '/src/third/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:57 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-only-one-dependency-project.js index c59ab5c275a..3bdb94abaa9 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/emitHelpers-in-only-one-dependency-project.js @@ -133,22 +133,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:09 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:10 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:19 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:20 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:29 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:30 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2303,22 +2303,22 @@ function forfirstfirst_PART1Rest() { }console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:47 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:48 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:49 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:57 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:58 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:00:59 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:04 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -3449,22 +3449,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:13 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:14 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:15 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:23 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:24 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:25 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:31 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/explainFiles.js b/tests/baselines/reference/tsbuild/outfile-concat/explainFiles.js index 4898823e45e..1bcf4ccb3f0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/explainFiles.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/explainFiles.js @@ -131,14 +131,14 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose --explainFiles -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:07 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:08 AM] Building project '/src/first/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -148,9 +148,9 @@ src/first/first_part2.ts Part of 'files' list in tsconfig.json src/first/first_part3.ts Part of 'files' list in tsconfig.json -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:17 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:18 AM] Building project '/src/second/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -158,9 +158,9 @@ src/second/second_part1.ts Matched by include pattern '**/*' in 'src/second/tsconfig.json' src/second/second_part2.ts Matched by include pattern '**/*' in 'src/second/tsconfig.json' -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:27 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:28 AM] Building project '/src/third/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -1906,14 +1906,14 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose --explainFiles -[12:04:00 AM] Projects in this build: +[12:00:45 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:46 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:47 AM] Building project '/src/first/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -1923,11 +1923,11 @@ src/first/first_part2.ts Part of 'files' list in tsconfig.json src/first/first_part3.ts Part of 'files' list in tsconfig.json -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:55 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:00:56 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:57 AM] Building project '/src/third/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -3218,14 +3218,14 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose --explainFiles -[12:07:00 AM] Projects in this build: +[12:01:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:11 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:12 AM] Building project '/src/first/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -3235,13 +3235,13 @@ src/first/first_part2.ts Part of 'files' list in tsconfig.json src/first/first_part3.ts Part of 'files' list in tsconfig.json -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:20 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:21 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:22 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:27 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-all-projects.js index ede8ff76c5a..2c165b72e99 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-all-projects.js @@ -149,22 +149,22 @@ thirdthird_part1Spread(10, ...thirdthird_part1_ar); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:15 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:16 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:17 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:26 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:27 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:36 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:37 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -3902,22 +3902,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:54 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:55 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:56 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:04 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:05 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:06 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:11 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -6106,22 +6106,22 @@ function forfirstfirst_PART1Rest() { }console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:20 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:21 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:22 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:30 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:31 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:32 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:38 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-different-projects.js index 2ca865271cb..38cd8cd46eb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/multiple-emitHelpers-in-different-projects.js @@ -139,22 +139,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:11 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:12 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:21 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:22 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:31 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:32 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2937,22 +2937,22 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:49 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:50 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:51 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:59 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:01 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:06 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -4533,22 +4533,22 @@ function forfirstfirst_PART1Rest() { }console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:15 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:16 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:17 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:25 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:26 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:27 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:33 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-all-projects.js index 64c095e3704..b69c99cca3e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-all-projects.js @@ -136,22 +136,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:15 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:16 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:25 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:26 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:35 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:36 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -2218,20 +2218,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:53 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:54 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:55 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:03 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:01:04 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:05 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -3733,22 +3733,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:18 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:19 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:20 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:28 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:29 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:30 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:35 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -4905,22 +4905,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:10:00 AM] Projects in this build: +[12:01:44 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:10:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:45 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:10:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:46 AM] Building project '/src/first/tsconfig.json'... -[12:10:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:54 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:10:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:55 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:10:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:56 AM] Updating output of project '/src/third/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:02:02 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-different-projects.js index b13279d62ca..2f0f11c73f3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/multiple-prologues-in-different-projects.js @@ -133,22 +133,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:11 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:12 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:21 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:22 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:31 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:32 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2091,22 +2091,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:49 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:50 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:51 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:59 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:01 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:06 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -3161,22 +3161,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:15 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:16 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:17 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:25 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part2.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:26 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:27 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:33 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-all-projects.js index d023836a57c..fcd1f1f69ef 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-all-projects.js @@ -135,22 +135,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:11 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:12 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:21 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:22 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:31 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:32 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -1933,20 +1933,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:49 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:50 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:51 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:59 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:01 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -3267,22 +3267,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:15 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:16 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:24 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:25 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:26 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:31 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-only-one-dependency-project.js index ab0d71861dd..1549d275310 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/shebang-in-only-one-dependency-project.js @@ -132,22 +132,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1897,22 +1897,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:46 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:47 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:48 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:56 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:57 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:00:58 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:03 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/strict-in-all-projects.js index b1a5cd9a008..f1cae324651 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/strict-in-all-projects.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:10 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:11 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:20 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:21 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:30 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:31 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -1994,20 +1994,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:48 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:49 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:50 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:58 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:00:59 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:00 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -3369,22 +3369,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:13 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:14 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:15 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:23 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:24 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:25 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:30 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -4407,22 +4407,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:10:00 AM] Projects in this build: +[12:01:39 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:10:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:40 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:10:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:41 AM] Building project '/src/first/tsconfig.json'... -[12:10:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:49 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:10:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:50 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:10:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:51 AM] Updating output of project '/src/third/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:57 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/strict-in-one-dependency.js index 3541cd64a50..398b8508f8f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/strict-in-one-dependency.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1925,22 +1925,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:46 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:47 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:48 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:56 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:57 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:00:58 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:03 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2892,22 +2892,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:12 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:13 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:14 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:22 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:23 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:24 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:30 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-baseline-when-internal-is-inside-another-internal.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-baseline-when-internal-is-inside-another-internal.js index 68d3abfc31b..40c0dac4620 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-baseline-when-internal-is-inside-another-internal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-baseline-when-internal-is-inside-another-internal.js @@ -159,22 +159,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:09 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:10 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:19 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:20 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:29 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:30 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index f46fc4ab64a..1e89edc1373 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -158,22 +158,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:11 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:12 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:13 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:22 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:23 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:32 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:33 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -5693,26 +5693,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:50 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:51 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:52 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:01 AM] Updating output of project '/src/second/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:06 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:11 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:12 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:17 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -10023,26 +10023,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:27 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:28 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:29 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:37 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:38 AM] Updating output of project '/src/second/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:42 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:48 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:49 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:54 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment.js index ffa75e13c6d..b49f73cf28e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-comment.js @@ -157,22 +157,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:10 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:11 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:20 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:21 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:30 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:31 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -5402,22 +5402,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:48 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:49 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:50 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:58 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:59 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:00 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:05 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -7731,22 +7731,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:15 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:16 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:24 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:25 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:26 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:31 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 76d4e39c8c2..795e00d38ae 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -158,22 +158,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:15 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:16 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:25 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:26 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:35 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:36 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -6035,26 +6035,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:53 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:54 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:55 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:03 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:04 AM] Updating output of project '/src/second/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:09 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:14 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:15 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:20 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled.js index 10d0ef05d26..8ca8f6e8e81 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -157,22 +157,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:12 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:13 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:14 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:23 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:24 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:33 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:34 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -5738,22 +5738,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:51 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:52 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:53 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:01 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:02 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:03 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:08 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-few-members-of-enum-are-internal.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-few-members-of-enum-are-internal.js index 8a101f713d0..f590ed1d3d0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-few-members-of-enum-are-internal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-few-members-of-enum-are-internal.js @@ -154,22 +154,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:09 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:10 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:19 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:20 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:29 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:30 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-one-two-three-are-prepended-in-order.js index 9819ba0b5f4..b04f3b500d1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -158,22 +158,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:11 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:12 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:13 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:22 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:23 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:32 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:33 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -5713,22 +5713,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:50 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:51 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:52 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is out of date because oldest output 'src/2/second-output.js' is older than newest input 'src/first' +[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because oldest output 'src/2/second-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/second/tsconfig.json'... +[12:01:01 AM] Building project '/src/second/tsconfig.json'... -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/second' +[12:01:09 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/second' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:10 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -11269,26 +11269,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:25 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:26 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:27 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:35 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:36 AM] Updating output of project '/src/second/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:41 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:46 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:47 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:52 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -15621,26 +15621,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:10:00 AM] Projects in this build: +[12:02:02 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:10:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:02:03 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:10:00 AM] Building project '/src/first/tsconfig.json'... +[12:02:04 AM] Building project '/src/first/tsconfig.json'... -[12:10:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:02:12 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:10:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:02:13 AM] Updating output of project '/src/second/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:02:17 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:10:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:02:23 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:10:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:02:24 AM] Updating output of project '/src/third/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:02:29 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-prepend-is-completely-internal.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-prepend-is-completely-internal.js index d7a59e7566f..7ab0ff0f81b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-prepend-is-completely-internal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-when-prepend-is-completely-internal.js @@ -18,21 +18,55 @@ declare const console: { log(msg: any): void; }; /* @internal */ const A = 1; //// [/src/first/first_part2.ts] +console.log(f()); //// [/src/first/first_part3.ts] - +function f() { + return "JS does hoists"; +} //// [/src/first/tsconfig.json] {"compilerOptions":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"sourceMap":true,"outFile":"./bin/first-output.js"},"files":["/src/first/first_PART1.ts"]} //// [/src/second/second_part1.ts] +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} //// [/src/second/second_part2.ts] +class C { + doSomething() { + console.log("something got done"); + } +} //// [/src/second/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": false, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "../2/second-output.js", + "skipDefaultLibCheck": true + }, + "references": [ + ] +} //// [/src/third/third_part1.ts] @@ -45,17 +79,17 @@ const B = 2; Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/first/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:11 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:12 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:21 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:22 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index eea9d3edb7d..ea02b542b4c 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -158,22 +158,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:15 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:16 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:25 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:26 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:35 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:36 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -5893,26 +5893,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:53 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:54 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:55 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:03 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:04 AM] Updating output of project '/src/second/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:09 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:14 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:15 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:20 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -10423,26 +10423,26 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:30 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:31 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:32 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:40 AM] Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/second/tsconfig.json'... +[12:01:41 AM] Updating output of project '/src/second/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... +[12:01:45 AM] Updating unchanged output timestamps of project '/src/second/tsconfig.json'... -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed +[12:01:51 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:52 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:57 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled.js index 2a870290c8c..a76f9e78315 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal-with-comments-emit-enabled.js @@ -157,22 +157,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:12 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:13 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:14 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:23 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:24 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:33 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:34 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -5602,22 +5602,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:51 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:52 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:53 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:01 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:02 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:03 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:08 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -8031,22 +8031,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:17 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:18 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:19 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:27 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:28 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:29 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:34 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal.js index 2edf0a4ecba..7b8fd895f35 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/stripInternal.js @@ -157,22 +157,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:10 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:11 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:20 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:21 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:30 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:31 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -5422,20 +5422,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:48 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:49 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:50 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:58 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:00:59 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:00 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -8133,22 +8133,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:13 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:14 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:15 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:23 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:24 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:25 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:30 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -10484,22 +10484,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:10:00 AM] Projects in this build: +[12:01:39 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:10:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:40 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:10:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:41 AM] Building project '/src/first/tsconfig.json'... -[12:10:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:49 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:10:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:50 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:10:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:51 AM] Updating output of project '/src/third/tsconfig.json'... -[12:10:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:56 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-all-projects.js index b85568947a1..48cc80392a1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-all-projects.js @@ -146,22 +146,22 @@ declare class thirdthird_part1 { } Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:12 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:13 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:14 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:23 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:24 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:33 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:34 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -2254,20 +2254,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:51 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:52 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:53 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:01 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' +[12:01:02 AM] Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js.map' is older than newest input 'src/first' -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:01:03 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -3839,22 +3839,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:07:00 AM] Projects in this build: +[12:01:16 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:07:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:01:17 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:07:00 AM] Building project '/src/first/tsconfig.json'... +[12:01:18 AM] Building project '/src/first/tsconfig.json'... -[12:07:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:01:26 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:07:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:01:27 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:07:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:01:28 AM] Updating output of project '/src/third/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:33 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-one-project.js index 4b349e58efd..87d297bab50 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/triple-slash-refs-in-one-project.js @@ -136,22 +136,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:09 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:10 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:19 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:20 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:29 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:30 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -2020,22 +2020,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:47 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:48 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:49 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:57 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:58 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:00:59 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:04 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-incremental.js b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-incremental.js index 8ad8cbc0d21..b7e1a5e27ad 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-incremental.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-incremental.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-uses-project-references.js index c249e307de6..ff11c35de4f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-is-not-composite-but-uses-project-references.js @@ -131,22 +131,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1726,20 +1726,20 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:43 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:44 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:45 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:53 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:54 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:55 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-specifies-tsBuildInfoFile.js index 8a8540230e9..b45fdc438c1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/when-final-project-specifies-tsBuildInfoFile.js @@ -132,22 +132,22 @@ c.doSomething(); Output:: /lib/tsc --b /src/third --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:00:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:00:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:00:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:00:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:00:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:00:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outfile-concat/when-source-files-are-empty-in-the-own-file.js b/tests/baselines/reference/tsbuild/outfile-concat/when-source-files-are-empty-in-the-own-file.js index f7272bccaf8..3050a9a42b3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/when-source-files-are-empty-in-the-own-file.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/when-source-files-are-empty-in-the-own-file.js @@ -129,22 +129,22 @@ class C { Output:: /lib/tsc --b /src/third --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:01:00 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist +[12:00:08 AM] Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist -[12:01:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:09 AM] Building project '/src/first/tsconfig.json'... -[12:01:00 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist +[12:00:18 AM] Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist -[12:01:00 AM] Building project '/src/second/tsconfig.json'... +[12:00:19 AM] Building project '/src/second/tsconfig.json'... -[12:01:00 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist +[12:00:28 AM] Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist -[12:01:00 AM] Building project '/src/third/tsconfig.json'... +[12:00:29 AM] Building project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success @@ -1782,22 +1782,22 @@ console.log(s); Output:: /lib/tsc --b /src/third --verbose -[12:04:00 AM] Projects in this build: +[12:00:46 AM] Projects in this build: * src/first/tsconfig.json * src/second/tsconfig.json * src/third/tsconfig.json -[12:04:00 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' +[12:00:47 AM] Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' -[12:04:00 AM] Building project '/src/first/tsconfig.json'... +[12:00:48 AM] Building project '/src/first/tsconfig.json'... -[12:04:00 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' +[12:00:56 AM] Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js.map' -[12:04:00 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed +[12:00:57 AM] Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed -[12:04:00 AM] Updating output of project '/src/third/tsconfig.json'... +[12:00:58 AM] Updating output of project '/src/third/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... +[12:01:03 AM] Updating unchanged output timestamps of project '/src/third/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified-and-is-composite.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified-and-is-composite.js index 7be5dd8a11d..ea46431e9b3 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified-and-is-composite.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified-and-is-composite.js @@ -24,12 +24,12 @@ export const x = 10; Output:: /lib/tsc --b /src/tsconfig.json -v -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:10 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:11 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -46,7 +46,7 @@ exports.x = 10; //// [/src/dist/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -63,7 +63,7 @@ exports.x = 10; }, "../src/index.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6057683066-export declare const x = 10;\r\n" } }, "options": { @@ -78,7 +78,7 @@ exports.x = 10; ] }, "version": "FakeTSVersion", - "size": 742 + "size": 813 } @@ -89,10 +89,10 @@ Input:: Output:: /lib/tsc --b /src/tsconfig.json -v -[12:04:00 AM] Projects in this build: +[12:00:18 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/src/index.js' +[12:00:19 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/src/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js index 11648d4fe14..cc9359c6661 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js @@ -24,12 +24,12 @@ export const x = 10; Output:: /lib/tsc --b /src/tsconfig.json -v -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:10 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:11 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -49,10 +49,10 @@ Input:: Output:: /lib/tsc --b /src/tsconfig.json -v -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/index.js' +[12:00:15 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js index 4042ac3ef0f..b5088545626 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js @@ -27,12 +27,12 @@ export type t = string; Output:: /lib/tsc --b /src/tsconfig.json -v -[12:01:00 AM] Projects in this build: +[12:00:11 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:12 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:13 AM] Building project '/src/tsconfig.json'... error TS6059: File '/src/types/type.ts' is not under 'rootDir' '/src/src'. 'rootDir' is expected to contain all source files. The file is in the program because: @@ -52,12 +52,12 @@ Input:: Output:: /lib/tsc --b /src/tsconfig.json -v -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:15 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:16 AM] Building project '/src/tsconfig.json'... error TS6059: File '/src/types/type.ts' is not under 'rootDir' '/src/src'. 'rootDir' is expected to contain all source files. The file is in the program because: @@ -99,7 +99,7 @@ exports.x = 10; //// [/src/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/index.ts","./types/type.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10726455937-export const x = 10;","-4885977236-export type t = string;"],"options":{"composite":true,"outDir":"./dist","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/index.ts","./types/type.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"},{"version":"-4885977236-export type t = string;","signature":"-4409762125-export declare type t = string;\r\n"}],"options":{"composite":true,"outDir":"./dist","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -117,11 +117,11 @@ exports.x = 10; }, "./src/index.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6057683066-export declare const x = 10;\r\n" }, "./types/type.ts": { "version": "-4885977236-export type t = string;", - "signature": "-4885977236-export type t = string;" + "signature": "-4409762125-export declare type t = string;\r\n" } }, "options": { @@ -133,7 +133,7 @@ exports.x = 10; "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 781 + "size": 926 } //// [/src/types/type.d.ts] diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js index b8a88cf7d28..bf218767e26 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js @@ -27,12 +27,12 @@ export type t = string; Output:: /lib/tsc --b /src/tsconfig.json -v -[12:01:00 AM] Projects in this build: +[12:00:11 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:12 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:13 AM] Building project '/src/tsconfig.json'... error TS6059: File '/src/types/type.ts' is not under 'rootDir' '/src/src'. 'rootDir' is expected to contain all source files. The file is in the program because: @@ -52,12 +52,12 @@ Input:: Output:: /lib/tsc --b /src/tsconfig.json -v -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:15 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:04:00 AM] Building project '/src/tsconfig.json'... +[12:00:16 AM] Building project '/src/tsconfig.json'... error TS6059: File '/src/types/type.ts' is not under 'rootDir' '/src/src'. 'rootDir' is expected to contain all source files. The file is in the program because: diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js index d3b05377a5e..ed727c451f7 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js @@ -24,12 +24,12 @@ export const x = 10; Output:: /lib/tsc --b /src/tsconfig.json -v -[12:01:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/tsconfig.json -[12:01:00 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[12:00:10 AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig.json'... +[12:00:11 AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success @@ -49,10 +49,10 @@ Input:: Output:: /lib/tsc --b /src/tsconfig.json -v -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig.json -[12:04:00 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/index.js' +[12:00:15 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/builds-correctly.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/builds-correctly.js index 951c80ec293..29d1169125a 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/builds-correctly.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/builds-correctly.js @@ -83,7 +83,7 @@ exports.b = 0; //// [/src/dist/main/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../src/main/b.ts","../../src/main/a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-11678562673-export const b = 0;\r\n","-17071184049-import { b } from './b';\r\nconst a = b;"],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../src/main/b.ts","../../src/main/a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11678562673-export const b = 0;\r\n","signature":"-3829176033-export declare const b = 0;\r\n"},{"version":"-17071184049-import { b } from './b';\r\nconst a = b;","signature":"-4882119183-export {};\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/dist/main/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -106,11 +106,11 @@ exports.b = 0; }, "../../src/main/b.ts": { "version": "-11678562673-export const b = 0;\r\n", - "signature": "-11678562673-export const b = 0;\r\n" + "signature": "-3829176033-export declare const b = 0;\r\n" }, "../../src/main/a.ts": { "version": "-17071184049-import { b } from './b';\r\nconst a = b;", - "signature": "-17071184049-import { b } from './b';\r\nconst a = b;" + "signature": "-4882119183-export {};\r\n" } }, "options": { @@ -125,11 +125,7 @@ exports.b = 0; "../../src/main/b.ts" ] }, - "exportedModulesMap": { - "../../src/main/a.ts": [ - "../../src/main/b.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../lib/lib.d.ts", "../../src/main/a.ts", @@ -137,7 +133,7 @@ exports.b = 0; ] }, "version": "FakeTSVersion", - "size": 930 + "size": 1048 } //// [/src/dist/other/other.d.ts] @@ -152,7 +148,7 @@ exports.Other = 0; //// [/src/dist/other/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2951227185-export const Other = 0;\r\n"],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2951227185-export const Other = 0;\r\n","signature":"-7996259489-export declare const Other = 0;\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/dist/other/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -169,7 +165,7 @@ exports.Other = 0; }, "../../src/other/other.ts": { "version": "-2951227185-export const Other = 0;\r\n", - "signature": "-2951227185-export const Other = 0;\r\n" + "signature": "-7996259489-export declare const Other = 0;\r\n" } }, "options": { @@ -187,6 +183,6 @@ exports.Other = 0; ] }, "version": "FakeTSVersion", - "size": 828 + "size": 902 } diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js index 829c3d8bd69..12a5c45991f 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js @@ -57,17 +57,17 @@ export const Other = 0; Output:: /lib/tsc --b /src/src/main --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/src/other/tsconfig.json * src/src/main/tsconfig.json -[12:00:00 AM] Project 'src/src/other/tsconfig.json' is out of date because output file 'src/dist/other.js' does not exist +[12:00:08 AM] Project 'src/src/other/tsconfig.json' is out of date because output file 'src/dist/other.js' does not exist -[12:00:00 AM] Building project '/src/src/other/tsconfig.json'... +[12:00:09 AM] Building project '/src/src/other/tsconfig.json'... -[12:00:00 AM] Project 'src/src/main/tsconfig.json' is out of date because output file 'src/dist/a.js' does not exist +[12:00:15 AM] Project 'src/src/main/tsconfig.json' is out of date because output file 'src/dist/a.js' does not exist -[12:00:00 AM] Building project '/src/src/main/tsconfig.json'... +[12:00:16 AM] Building project '/src/src/main/tsconfig.json'... src/src/main/tsconfig.json:4:5 - error TS6377: Cannot write file '/src/dist/tsconfig.tsbuildinfo' because it will overwrite '.tsbuildinfo' file generated by referenced project '/src/src/other' @@ -92,7 +92,7 @@ exports.Other = 0; //// [/src/dist/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2951227185-export const Other = 0;\r\n"],"options":{"composite":true,"declaration":true,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2951227185-export const Other = 0;\r\n","signature":"-7996259489-export declare const Other = 0;\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -109,7 +109,7 @@ exports.Other = 0; }, "../src/other/other.ts": { "version": "-2951227185-export const Other = 0;\r\n", - "signature": "-2951227185-export const Other = 0;\r\n" + "signature": "-7996259489-export declare const Other = 0;\r\n" } }, "options": { @@ -126,6 +126,6 @@ exports.Other = 0; ] }, "version": "FakeTSVersion", - "size": 800 + "size": 874 } diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js index 8fe044e9134..a92cfc67c9b 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js @@ -33,23 +33,34 @@ export const Other = 0; {"compilerOptions":{"composite":true,"outDir":"../../dist/"}} //// [/src/tsconfig.base.json] - +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true + }, + "exclude": [ + "node_modules" + ] +} Output:: /lib/tsc --b /src/src/main --verbose -[12:00:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/src/other/tsconfig.json * src/src/main/tsconfig.json -[12:00:00 AM] Project 'src/src/other/tsconfig.json' is out of date because output file 'src/dist/other.js' does not exist +[12:00:09 AM] Project 'src/src/other/tsconfig.json' is out of date because output file 'src/dist/other.js' does not exist -[12:00:00 AM] Building project '/src/src/other/tsconfig.json'... +[12:00:10 AM] Building project '/src/src/other/tsconfig.json'... -[12:00:00 AM] Project 'src/src/main/tsconfig.json' is out of date because output file 'src/dist/a.js' does not exist +[12:00:16 AM] Project 'src/src/main/tsconfig.json' is out of date because output file 'src/dist/a.js' does not exist -[12:00:00 AM] Building project '/src/src/main/tsconfig.json'... +[12:00:17 AM] Building project '/src/src/main/tsconfig.json'... src/src/main/tsconfig.json:1:76 - error TS6377: Cannot write file '/src/dist/tsconfig.tsbuildinfo' because it will overwrite '.tsbuildinfo' file generated by referenced project '/src/src/other' @@ -74,7 +85,7 @@ exports.Other = 0; //// [/src/dist/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2951227185-export const Other = 0;\r\n"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2951227185-export const Other = 0;\r\n","signature":"-7996259489-export declare const Other = 0;\r\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -91,7 +102,7 @@ exports.Other = 0; }, "../src/other/other.ts": { "version": "-2951227185-export const Other = 0;\r\n", - "signature": "-2951227185-export const Other = 0;\r\n" + "signature": "-7996259489-export declare const Other = 0;\r\n" } }, "options": { @@ -106,6 +117,6 @@ exports.Other = 0; ] }, "version": "FakeTSVersion", - "size": 754 + "size": 828 } diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-no-error-when-tsbuildinfo-differ.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-no-error-when-tsbuildinfo-differ.js index 804e41039ba..93838c0fbfa 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-no-error-when-tsbuildinfo-differ.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-no-error-when-tsbuildinfo-differ.js @@ -33,23 +33,34 @@ export const Other = 0; {"compilerOptions":{"composite":true,"outDir":"../../dist/"}} //// [/src/tsconfig.base.json] - +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true + }, + "exclude": [ + "node_modules" + ] +} Output:: /lib/tsc --b /src/src/main/tsconfig.main.json --verbose -[12:00:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/src/other/tsconfig.other.json * src/src/main/tsconfig.main.json -[12:00:00 AM] Project 'src/src/other/tsconfig.other.json' is out of date because output file 'src/dist/other.js' does not exist +[12:00:11 AM] Project 'src/src/other/tsconfig.other.json' is out of date because output file 'src/dist/other.js' does not exist -[12:00:00 AM] Building project '/src/src/other/tsconfig.other.json'... +[12:00:12 AM] Building project '/src/src/other/tsconfig.other.json'... -[12:00:00 AM] Project 'src/src/main/tsconfig.main.json' is out of date because output file 'src/dist/a.js' does not exist +[12:00:18 AM] Project 'src/src/main/tsconfig.main.json' is out of date because output file 'src/dist/a.js' does not exist -[12:00:00 AM] Building project '/src/src/main/tsconfig.main.json'... +[12:00:19 AM] Building project '/src/src/main/tsconfig.main.json'... exitCode:: ExitStatus.Success @@ -88,7 +99,7 @@ exports.Other = 0; //// [/src/dist/tsconfig.main.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/main/b.ts","../src/main/a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-11678562673-export const b = 0;\r\n","-17071184049-import { b } from './b';\r\nconst a = b;"],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/main/b.ts","../src/main/a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-11678562673-export const b = 0;\r\n","signature":"-3829176033-export declare const b = 0;\r\n"},{"version":"-17071184049-import { b } from './b';\r\nconst a = b;","signature":"-4882119183-export {};\r\n"}],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig.main.tsbuildinfo.readable.baseline.txt] { @@ -111,11 +122,11 @@ exports.Other = 0; }, "../src/main/b.ts": { "version": "-11678562673-export const b = 0;\r\n", - "signature": "-11678562673-export const b = 0;\r\n" + "signature": "-3829176033-export declare const b = 0;\r\n" }, "../src/main/a.ts": { "version": "-17071184049-import { b } from './b';\r\nconst a = b;", - "signature": "-17071184049-import { b } from './b';\r\nconst a = b;" + "signature": "-4882119183-export {};\r\n" } }, "options": { @@ -127,11 +138,7 @@ exports.Other = 0; "../src/main/b.ts" ] }, - "exportedModulesMap": { - "../src/main/a.ts": [ - "../src/main/b.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/main/a.ts", @@ -139,11 +146,11 @@ exports.Other = 0; ] }, "version": "FakeTSVersion", - "size": 853 + "size": 971 } //// [/src/dist/tsconfig.other.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2951227185-export const Other = 0;\r\n"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/other/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2951227185-export const Other = 0;\r\n","signature":"-7996259489-export declare const Other = 0;\r\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig.other.tsbuildinfo.readable.baseline.txt] { @@ -160,7 +167,7 @@ exports.Other = 0; }, "../src/other/other.ts": { "version": "-2951227185-export const Other = 0;\r\n", - "signature": "-2951227185-export const Other = 0;\r\n" + "signature": "-7996259489-export declare const Other = 0;\r\n" } }, "options": { @@ -175,6 +182,6 @@ exports.Other = 0; ] }, "version": "FakeTSVersion", - "size": 754 + "size": 828 } diff --git a/tests/baselines/reference/tsbuild/publicAPI/build-with-custom-transformers.js b/tests/baselines/reference/tsbuild/publicAPI/build-with-custom-transformers.js index 801164a0b03..b218357820d 100644 --- a/tests/baselines/reference/tsbuild/publicAPI/build-with-custom-transformers.js +++ b/tests/baselines/reference/tsbuild/publicAPI/build-with-custom-transformers.js @@ -41,18 +41,18 @@ export function f22() { } // trailing Output:: /lib/tsc --b /src/tsconfig.json -[12:00:00 AM] Projects in this build: +[12:00:13 AM] Projects in this build: * src/shared/tsconfig.json * src/webpack/tsconfig.json * src/tsconfig.json -[12:00:00 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/shared/index.js' does not exist +[12:00:14 AM] Project 'src/shared/tsconfig.json' is out of date because output file 'src/shared/index.js' does not exist -[12:00:00 AM] Building project '/src/shared/tsconfig.json'... +[12:00:15 AM] Building project '/src/shared/tsconfig.json'... -[12:00:00 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/webpack/index.js' does not exist +[12:00:20 AM] Project 'src/webpack/tsconfig.json' is out of date because output file 'src/webpack/index.js' does not exist -[12:00:00 AM] Building project '/src/webpack/tsconfig.json'... +[12:00:21 AM] Building project '/src/webpack/tsconfig.json'... exitCode:: ExitStatus.Success Program root files: ["/src/shared/index.ts"] diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js b/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js index 761d5e83e6c..f3901ed5a20 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js @@ -42,24 +42,69 @@ export default hello.hello } //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*", "src/**/*.json" + ] +} Output:: /lib/tsc --b /src/tsconfig_withFiles.json --v --explainFiles -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig_withFiles.json -[12:00:00 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:07 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:00:00 AM] Building project '/src/tsconfig_withFiles.json'... +[12:00:08 AM] Building project '/src/tsconfig_withFiles.json'... lib/lib.d.ts Default library for target 'es3' @@ -93,7 +138,7 @@ exports["default"] = hello_json_1["default"].hello; //// [/src/dist/tsconfig_withFiles.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig_withFiles.tsbuildinfo.readable.baseline.txt] { @@ -120,7 +165,7 @@ exports["default"] = hello_json_1["default"].hello; }, "../src/index.ts": { "version": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello", - "signature": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -136,11 +181,7 @@ exports["default"] = hello_json_1["default"].hello; "../src/hello.json" ] }, - "exportedModulesMap": { - "../src/index.ts": [ - "../src/hello.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/hello.json", @@ -148,6 +189,6 @@ exports["default"] = hello_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 977 + "size": 1074 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/importing-json-module-from-project-reference.js b/tests/baselines/reference/tsbuild/resolveJsonModule/importing-json-module-from-project-reference.js index 680726f03f7..f472d1de303 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/importing-json-module-from-project-reference.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/importing-json-module-from-project-reference.js @@ -71,22 +71,22 @@ console.log(foo); Output:: /lib/tsc --b src/tsconfig.json --verbose --explainFiles -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/strings/tsconfig.json * src/main/tsconfig.json * src/tsconfig.json -[12:01:00 AM] Project 'src/strings/tsconfig.json' is out of date because output file 'src/strings/tsconfig.tsbuildinfo' does not exist +[12:00:07 AM] Project 'src/strings/tsconfig.json' is out of date because output file 'src/strings/tsconfig.tsbuildinfo' does not exist -[12:01:00 AM] Building project '/src/strings/tsconfig.json'... +[12:00:08 AM] Building project '/src/strings/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' src/strings/foo.json Matched by include pattern 'foo.json' in 'src/strings/tsconfig.json' -[12:01:00 AM] Project 'src/main/tsconfig.json' is out of date because output file 'src/main/index.js' does not exist +[12:00:11 AM] Project 'src/main/tsconfig.json' is out of date because output file 'src/main/index.js' does not exist -[12:01:00 AM] Building project '/src/main/tsconfig.json'... +[12:00:12 AM] Building project '/src/main/tsconfig.json'... lib/lib.d.ts Default library for target 'es5' @@ -109,7 +109,7 @@ console.log(foo_json_1.foo); //// [/src/main/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../strings/foo.json","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"4395333385-{\n \"foo\": \"bar baz\"\n}","-4651661680-import { foo } from '../strings/foo.json';\n\nconsole.log(foo);"],"options":{"composite":true,"esModuleInterop":true,"module":1,"rootDir":"..","strict":true,"target":1},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../strings/foo.json","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"4395333385-{\n \"foo\": \"bar baz\"\n}",{"version":"-4651661680-import { foo } from '../strings/foo.json';\n\nconsole.log(foo);","signature":"-4882119183-export {};\r\n"}],"options":{"composite":true,"esModuleInterop":true,"module":1,"rootDir":"..","strict":true,"target":1},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/src/main/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -136,7 +136,7 @@ console.log(foo_json_1.foo); }, "./index.ts": { "version": "-4651661680-import { foo } from '../strings/foo.json';\n\nconsole.log(foo);", - "signature": "-4651661680-import { foo } from '../strings/foo.json';\n\nconsole.log(foo);" + "signature": "-4882119183-export {};\r\n" } }, "options": { @@ -152,11 +152,7 @@ console.log(foo_json_1.foo); "../strings/foo.json" ] }, - "exportedModulesMap": { - "./index.ts": [ - "../strings/foo.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "./index.ts", @@ -164,7 +160,7 @@ console.log(foo_json_1.foo); ] }, "version": "FakeTSVersion", - "size": 937 + "size": 985 } //// [/src/strings/tsconfig.tsbuildinfo] @@ -215,14 +211,14 @@ Input:: Output:: /lib/tsc --b src/tsconfig.json --verbose --explainFiles -[12:04:00 AM] Projects in this build: +[12:00:17 AM] Projects in this build: * src/strings/tsconfig.json * src/main/tsconfig.json * src/tsconfig.json -[12:04:00 AM] Project 'src/strings/tsconfig.json' is up to date because newest input 'src/strings/foo.json' is older than oldest output 'src/strings/tsconfig.tsbuildinfo' +[12:00:18 AM] Project 'src/strings/tsconfig.json' is up to date because newest input 'src/strings/foo.json' is older than oldest output 'src/strings/tsconfig.tsbuildinfo' -[12:04:00 AM] Project 'src/main/tsconfig.json' is up to date because newest input 'src/main/index.ts' is older than oldest output 'src/main/index.js' +[12:00:19 AM] Project 'src/main/tsconfig.json' is up to date because newest input 'src/main/index.ts' is older than oldest output 'src/main/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js index a39c9a4c2fc..bebf482139e 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js @@ -25,10 +25,38 @@ import hello from "./hello.json" export default hello.hello //// [/src/tsconfig_withFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/index.ts", "src/hello.json" + ] +} //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] { @@ -51,18 +79,32 @@ export default hello.hello } //// [/src/tsconfig_withIncludeOfJson.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*", "src/**/*.json" + ] +} Output:: /lib/tsc --b /src/tsconfig_withIncludeAndFiles.json --v --explainFiles -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig_withIncludeAndFiles.json -[12:00:00 AM] Project 'src/tsconfig_withIncludeAndFiles.json' is out of date because output file 'src/dist/src/hello.json' does not exist +[12:00:07 AM] Project 'src/tsconfig_withIncludeAndFiles.json' is out of date because output file 'src/dist/src/hello.json' does not exist -[12:00:00 AM] Building project '/src/tsconfig_withIncludeAndFiles.json'... +[12:00:08 AM] Building project '/src/tsconfig_withIncludeAndFiles.json'... lib/lib.d.ts Default library for target 'es3' @@ -96,7 +138,7 @@ exports["default"] = hello_json_1["default"].hello; //// [/src/dist/tsconfig_withIncludeAndFiles.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig_withIncludeAndFiles.tsbuildinfo.readable.baseline.txt] { @@ -123,7 +165,7 @@ exports["default"] = hello_json_1["default"].hello; }, "../src/index.ts": { "version": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello", - "signature": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -139,11 +181,7 @@ exports["default"] = hello_json_1["default"].hello; "../src/hello.json" ] }, - "exportedModulesMap": { - "../src/index.ts": [ - "../src/hello.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/hello.json", @@ -151,6 +189,6 @@ exports["default"] = hello_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 977 + "size": 1074 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js index a9f864eb9ce..5347b4cacb6 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js @@ -23,13 +23,58 @@ import hello from "./index.json" export default hello.hello //// [/src/tsconfig_withFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/index.ts", "src/hello.json" + ] +} //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] { @@ -52,12 +97,12 @@ export default hello.hello Output:: /lib/tsc --b /src/tsconfig_withIncludeOfJson.json --v --explainFiles -[12:00:00 AM] Projects in this build: +[12:00:09 AM] Projects in this build: * src/tsconfig_withIncludeOfJson.json -[12:00:00 AM] Project 'src/tsconfig_withIncludeOfJson.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:10 AM] Project 'src/tsconfig_withIncludeOfJson.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:00:00 AM] Building project '/src/tsconfig_withIncludeOfJson.json'... +[12:00:11 AM] Building project '/src/tsconfig_withIncludeOfJson.json'... lib/lib.d.ts Default library for target 'es3' @@ -89,7 +134,7 @@ exports["default"] = index_json_1["default"].hello; //// [/src/dist/tsconfig_withIncludeOfJson.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2379406821-{\"hello\":\"world\"}","-6335882310-import hello from \"./index.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2379406821-{\"hello\":\"world\"}",{"version":"-6335882310-import hello from \"./index.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig_withIncludeOfJson.tsbuildinfo.readable.baseline.txt] { @@ -116,7 +161,7 @@ exports["default"] = index_json_1["default"].hello; }, "../src/index.ts": { "version": "-6335882310-import hello from \"./index.json\"\n\nexport default hello.hello", - "signature": "-6335882310-import hello from \"./index.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -132,11 +177,7 @@ exports["default"] = index_json_1["default"].hello; "../src/index.json" ] }, - "exportedModulesMap": { - "../src/index.ts": [ - "../src/index.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/index.json", @@ -144,6 +185,6 @@ exports["default"] = index_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 970 + "size": 1067 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js index 13c1edfb022..7696b5ed77d 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js @@ -25,13 +25,58 @@ import hello from "./hello.json" export default hello.hello //// [/src/tsconfig_withFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/index.ts", "src/hello.json" + ] +} //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] { @@ -54,12 +99,12 @@ export default hello.hello Output:: /lib/tsc --b /src/tsconfig_withIncludeOfJson.json --v --explainFiles -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig_withIncludeOfJson.json -[12:00:00 AM] Project 'src/tsconfig_withIncludeOfJson.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:07 AM] Project 'src/tsconfig_withIncludeOfJson.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:00:00 AM] Building project '/src/tsconfig_withIncludeOfJson.json'... +[12:00:08 AM] Building project '/src/tsconfig_withIncludeOfJson.json'... lib/lib.d.ts Default library for target 'es3' @@ -93,7 +138,7 @@ exports["default"] = hello_json_1["default"].hello; //// [/src/dist/tsconfig_withIncludeOfJson.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig_withIncludeOfJson.tsbuildinfo.readable.baseline.txt] { @@ -120,7 +165,7 @@ exports["default"] = hello_json_1["default"].hello; }, "../src/index.ts": { "version": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello", - "signature": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -136,11 +181,7 @@ exports["default"] = hello_json_1["default"].hello; "../src/hello.json" ] }, - "exportedModulesMap": { - "../src/index.ts": [ - "../src/hello.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/hello.json", @@ -148,6 +189,6 @@ exports["default"] = hello_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 977 + "size": 1074 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js index c865691cdf6..476128c015b 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js @@ -25,7 +25,21 @@ import hello from "./hello.json" export default hello.hello //// [/src/tsconfig_withFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/index.ts", "src/hello.json" + ] +} //// [/src/tsconfig_withInclude.json] { @@ -45,21 +59,52 @@ export default hello.hello } //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*", "src/**/*.json" + ] +} Output:: /lib/tsc --b /src/tsconfig_withInclude.json --v --explainFiles -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/tsconfig_withInclude.json -[12:00:00 AM] Project 'src/tsconfig_withInclude.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:07 AM] Project 'src/tsconfig_withInclude.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:00:00 AM] Building project '/src/tsconfig_withInclude.json'... +[12:00:08 AM] Building project '/src/tsconfig_withInclude.json'... src/src/index.ts:1:19 - error TS6307: File '/src/src/hello.json' is not listed within the file list of project '/src/tsconfig_withInclude.json'. Projects must list all files or use an 'include' pattern. diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js index 6c6c6d52e20..f4bd738681c 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js @@ -42,24 +42,69 @@ export default hello.hello } //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*", "src/**/*.json" + ] +} Output:: /lib/tsc --b src/tsconfig_withFiles.json --verbose --explainFiles -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/tsconfig_withFiles.json -[12:01:00 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/dist/src/index.js' does not exist +[12:00:08 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/dist/src/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig_withFiles.json'... +[12:00:09 AM] Building project '/src/tsconfig_withFiles.json'... lib/lib.d.ts Default library for target 'es3' @@ -96,7 +141,7 @@ exports["default"] = hello_json_1["default"].hello; {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,4DAAgC;AAEhC,qBAAe,uBAAK,CAAC,KAAK,CAAA"} //// [/src/dist/tsconfig_withFiles.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/dist/tsconfig_withFiles.tsbuildinfo.readable.baseline.txt] { @@ -123,7 +168,7 @@ exports["default"] = hello_json_1["default"].hello; }, "../src/index.ts": { "version": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello", - "signature": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -140,11 +185,7 @@ exports["default"] = hello_json_1["default"].hello; "../src/hello.json" ] }, - "exportedModulesMap": { - "../src/index.ts": [ - "../src/hello.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "../src/hello.json", @@ -152,7 +193,7 @@ exports["default"] = hello_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 994 + "size": 1091 } @@ -163,10 +204,10 @@ Input:: Output:: /lib/tsc --b src/tsconfig_withFiles.json --verbose --explainFiles -[12:04:00 AM] Projects in this build: +[12:00:18 AM] Projects in this build: * src/tsconfig_withFiles.json -[12:04:00 AM] Project 'src/tsconfig_withFiles.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/src/index.js' +[12:00:19 AM] Project 'src/tsconfig_withFiles.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/dist/src/hello.json' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js b/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js index f827ba3f874..ef88243f69f 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js @@ -42,24 +42,69 @@ export default hello.hello } //// [/src/tsconfig_withInclude.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeAndFiles.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "files": [ + "src/hello.json" + ], + "include": [ + "src/**/*" + ] +} //// [/src/tsconfig_withIncludeOfJson.json] - +{ + "compilerOptions": { + "composite": true, + "moduleResolution": "node", + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true + }, + "include": [ + "src/**/*", "src/**/*.json" + ] +} Output:: /lib/tsc --b src/tsconfig_withFiles.json --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/tsconfig_withFiles.json -[12:01:00 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/src/index.js' does not exist +[12:00:08 AM] Project 'src/tsconfig_withFiles.json' is out of date because output file 'src/src/index.js' does not exist -[12:01:00 AM] Building project '/src/tsconfig_withFiles.json'... +[12:00:09 AM] Building project '/src/tsconfig_withFiles.json'... exitCode:: ExitStatus.Success @@ -80,7 +125,7 @@ exports["default"] = hello_json_1["default"].hello; //// [/src/tsconfig_withFiles.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello","signature":"-1680156224-declare const _default: string;\r\nexport default _default;\r\n"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/tsconfig_withFiles.tsbuildinfo.readable.baseline.txt] { @@ -107,7 +152,7 @@ exports["default"] = hello_json_1["default"].hello; }, "./src/index.ts": { "version": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello", - "signature": "-27703454282-import hello from \"./hello.json\"\n\nexport default hello.hello" + "signature": "-1680156224-declare const _default: string;\r\nexport default _default;\r\n" } }, "options": { @@ -122,11 +167,7 @@ exports["default"] = hello_json_1["default"].hello; "./src/hello.json" ] }, - "exportedModulesMap": { - "./src/index.ts": [ - "./src/hello.json" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../lib/lib.d.ts", "./src/hello.json", @@ -134,7 +175,7 @@ exports["default"] = hello_json_1["default"].hello; ] }, "version": "FakeTSVersion", - "size": 958 + "size": 1055 } @@ -145,10 +186,10 @@ Input:: Output:: /lib/tsc --b src/tsconfig_withFiles.json --verbose -[12:04:00 AM] Projects in this build: +[12:00:14 AM] Projects in this build: * src/tsconfig_withFiles.json -[12:04:00 AM] Project 'src/tsconfig_withFiles.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/src/index.js' +[12:00:15 AM] Project 'src/tsconfig_withFiles.json' is up to date because newest input 'src/src/index.ts' is older than oldest output 'src/src/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js b/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js index fd630de3248..1675145260d 100644 --- a/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js +++ b/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js @@ -89,9 +89,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -136,7 +149,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -155,11 +168,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -183,7 +196,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -209,7 +222,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -224,6 +237,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -242,7 +258,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -259,7 +275,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -271,7 +286,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -292,7 +307,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -334,7 +349,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -357,9 +372,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -371,7 +384,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } diff --git a/tests/baselines/reference/tsbuild/sample1/building-project-in-not-build-order-doesnt-throw-error.js b/tests/baselines/reference/tsbuild/sample1/building-project-in-not-build-order-doesnt-throw-error.js index f2f73d399f0..fdab2843fa1 100644 --- a/tests/baselines/reference/tsbuild/sample1/building-project-in-not-build-order-doesnt-throw-error.js +++ b/tests/baselines/reference/tsbuild/sample1/building-project-in-not-build-order-doesnt-throw-error.js @@ -1,14 +1,31 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] @@ -22,6 +39,12 @@ Input:: } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -40,6 +63,14 @@ Input:: //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -58,9 +89,22 @@ Input:: } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} diff --git a/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js b/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js index 70e9a3a8df6..92c7a931152 100644 --- a/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js +++ b/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js @@ -63,6 +63,14 @@ export const m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -81,26 +89,39 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --build /src/logic2/tsconfig.json -[12:00:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:07 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:08 AM] Building project '/src/core/tsconfig.json'... -[12:00:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:17 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:00:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:18 AM] Building project '/src/logic/tsconfig.json'... exitCode:: ExitStatus.Success @@ -140,7 +161,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -159,11 +180,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -187,7 +208,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -213,7 +234,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -228,6 +249,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -246,7 +270,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -263,7 +287,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -275,6 +298,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } diff --git a/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js b/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js index 88764c1e9d2..f7896cd8809 100644 --- a/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js +++ b/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js @@ -127,7 +127,55 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1352 +} Project Result:: {"project":"/user/username/projects/logic/tsconfig.json","result":0} @@ -156,7 +204,72 @@ export declare const m: typeof mod; //// [/user/username/projects/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1469 +} Project Result:: {"project":"/user/username/projects/tests/tsconfig.json","result":0} @@ -180,7 +293,85 @@ export declare const m: typeof mod; //// [/user/username/projects/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} + +//// [/user/username/projects/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1614 +} Project Result:: {} diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js index 6e4ef715f39..2666ba58507 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js @@ -77,9 +77,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -124,7 +137,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -143,11 +156,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -171,7 +184,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.js] @@ -197,7 +210,7 @@ export declare const m: typeof mod; //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"declarationDir":"./out/decls","sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"declarationDir":"./out/decls","sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -212,6 +225,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -230,7 +246,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -247,7 +263,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -259,7 +274,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1374 + "size": 1559 } //// [/src/tests/index.d.ts] @@ -280,7 +295,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/out/decls/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/out/decls/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -322,7 +337,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -345,9 +360,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/out/decls/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -359,6 +372,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1588 + "size": 1712 } diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js index 087b2c5705a..29b490c8712 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js @@ -77,9 +77,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -124,7 +137,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -143,11 +156,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -171,7 +184,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/outDir/index.d.ts] @@ -197,7 +210,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/outDir/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../../core/index.d.ts","../../core/anothermodule.d.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"outDir":"./","sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../../core/index.d.ts","../../core/anothermodule.d.ts","../index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"outDir":"./","sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -212,6 +225,9 @@ exports.m = mod; [ "../../core/index.d.ts", "../../core/anothermodule.d.ts" + ], + [ + "../../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -230,7 +246,7 @@ exports.m = mod; }, "../index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -247,7 +263,6 @@ exports.m = mod; }, "exportedModulesMap": { "../index.ts": [ - "../../core/index.d.ts", "../../core/anothermodule.d.ts" ] }, @@ -259,7 +274,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1367 + "size": 1552 } //// [/src/tests/index.d.ts] @@ -280,7 +295,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/outdir/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/outdir/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -322,7 +337,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -345,9 +360,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/outdir/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -359,6 +372,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1585 + "size": 1709 } diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js index bfb3843cfcc..1b3b0157672 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js @@ -39,33 +39,84 @@ declare const dts: any; } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/core --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js index 08803bc8204..4d661ecebce 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js @@ -63,6 +63,14 @@ export const m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -81,9 +89,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -128,7 +149,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -147,11 +168,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -175,7 +196,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -201,7 +222,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -216,6 +237,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -234,7 +258,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -251,7 +275,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -263,6 +286,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } diff --git a/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js b/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js index aeb065309af..eeb8a8b0474 100644 --- a/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js +++ b/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js @@ -15,12 +15,17 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] @@ -34,9 +39,17 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] @@ -60,18 +73,85 @@ declare const dts: any; } //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -90,7 +170,72 @@ declare const dts: any; //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] import * as mod from '../core/anotherModule'; @@ -98,9 +243,26 @@ export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -119,28 +281,119 @@ export declare const m: typeof mod; } //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} + +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:01:00 AM] Projects in this build: +[12:00:23 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' +[12:00:24 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' -[12:01:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:00:25 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:01:00 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' +[12:00:26 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' exitCode:: ExitStatus.Success @@ -156,18 +409,18 @@ const m = 10; Output:: /lib/tsc --b /src/tests --verbose -[12:04:00 AM] Projects in this build: +[12:00:28 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' +[12:00:29 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' -[12:04:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:00:30 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:04:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/index.ts' +[12:00:31 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/index.ts' -[12:04:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:32 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -232,24 +485,24 @@ export function multiply(a: number, b: number) { return a * b; } Output:: /lib/tsc --b /src/tests --verbose -[12:07:00 AM] Projects in this build: +[12:00:38 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:07:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' +[12:00:39 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' -[12:07:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:40 AM] Building project '/src/core/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... +[12:00:46 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... -[12:07:00 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:00:51 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... +[12:00:53 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... -[12:07:00 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:00:58 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... +[12:01:00 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -270,7 +523,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-2157245566-export const someString: string = \"WELCOME PLANET\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-2157245566-export const someString: string = \"WELCOME PLANET\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -289,7 +542,7 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-2157245566-export const someString: string = \"WELCOME PLANET\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", @@ -317,7 +570,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1351 + "size": 1433 } //// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time @@ -346,18 +599,18 @@ Input:: Output:: /lib/tsc --b /src/tests --verbose -[12:10:00 AM] Projects in this build: +[12:01:05 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:10:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/anotherModule.js' +[12:01:06 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/index.js' -[12:10:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:01:07 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' -[12:10:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.json' +[12:01:08 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.json' -[12:10:00 AM] Building project '/src/tests/tsconfig.json'... +[12:01:09 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js b/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js index b68bc0aba1c..fbce043a86c 100644 --- a/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js +++ b/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js @@ -1,77 +1,383 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.d.ts] - +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] - +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} //// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} diff --git a/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js b/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js index 45ca7a62468..7499c9141cd 100644 --- a/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js @@ -1,77 +1,383 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.d.ts] - +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] - +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} //// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js index 8193d319ff0..4e885be7d2d 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js @@ -63,6 +63,14 @@ export const m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -81,36 +89,49 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... -[12:00:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:18 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:00:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:19 AM] Building project '/src/logic/tsconfig.json'... src/logic/index.ts:3:14 - error TS2339: Property 'muitply' does not exist on type 'typeof import("/src/core/index")'. 3 return c.muitply();    ~~~~~~~ -[12:00:00 AM] Project 'src/tests/tsconfig.json' can't be built because its dependency 'src/logic' has errors +[12:00:22 AM] Project 'src/tests/tsconfig.json' can't be built because its dependency 'src/logic' has errors -[12:00:00 AM] Skipping build of project '/src/tests/tsconfig.json' because its dependency '/src/logic' has errors +[12:00:23 AM] Skipping build of project '/src/tests/tsconfig.json' because its dependency '/src/logic' has errors Found 1 error. @@ -153,7 +174,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -172,11 +193,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -200,7 +221,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js index 301ef4888dd..1294f8165a8 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js @@ -1,32 +1,65 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.d.ts] - +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] @@ -43,15 +76,34 @@ Input:: {"version":"FakeTSVersion"} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -73,12 +125,31 @@ Input:: {"version":"FakeTSVersion"} //// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -100,25 +171,38 @@ Input:: {"version":"FakeTSVersion"} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:00:00 AM] Projects in this build: +[12:00:20 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' +[12:00:21 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' -[12:00:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:00:22 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:00:00 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' +[12:00:23 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-write-any-files-in-a-dry-build.js b/tests/baselines/reference/tsbuild/sample1/does-not-write-any-files-in-a-dry-build.js index b3d5781bcf8..9b45ce65331 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-write-any-files-in-a-dry-build.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-write-any-files-in-a-dry-build.js @@ -1,14 +1,31 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] @@ -22,6 +39,12 @@ Input:: } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -40,6 +63,14 @@ Input:: //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -58,20 +89,33 @@ Input:: } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --dry -[12:00:00 AM] A non-dry build would build project '/src/core/tsconfig.json' +[12:00:06 AM] A non-dry build would build project '/src/core/tsconfig.json' -[12:00:00 AM] A non-dry build would build project '/src/logic/tsconfig.json' +[12:00:07 AM] A non-dry build would build project '/src/logic/tsconfig.json' -[12:00:00 AM] A non-dry build would build project '/src/tests/tsconfig.json' +[12:00:08 AM] A non-dry build would build project '/src/tests/tsconfig.json' exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/explainFiles.js b/tests/baselines/reference/tsbuild/sample1/explainFiles.js index 2c4dec3fd7a..d075688f2dd 100644 --- a/tests/baselines/reference/tsbuild/sample1/explainFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/explainFiles.js @@ -89,23 +89,36 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --explainFiles --v -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:07 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:08 AM] Building project '/src/core/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -115,9 +128,9 @@ src/core/index.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' src/core/some_decl.d.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' -[12:01:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:17 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:01:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:18 AM] Building project '/src/logic/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -129,9 +142,9 @@ src/core/anotherModule.d.ts File is output of project reference source 'src/core/anotherModule.ts' src/logic/index.ts Matched by include pattern '**/*' in 'src/logic/tsconfig.json' -[12:01:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:24 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:01:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:25 AM] Building project '/src/tests/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -185,7 +198,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -204,11 +217,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -232,7 +245,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -258,7 +271,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -273,6 +286,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -291,7 +307,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -308,7 +324,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -320,7 +335,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -341,7 +356,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -383,7 +398,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -406,9 +421,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -420,7 +433,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } @@ -438,16 +451,16 @@ export class someClass { } Output:: /lib/tsc --b /src/tests --explainFiles --v -[12:04:00 AM] Projects in this build: +[12:00:31 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' +[12:00:32 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' -[12:04:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:33 AM] Building project '/src/core/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... +[12:00:39 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -457,9 +470,9 @@ src/core/index.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' src/core/some_decl.d.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' -[12:04:00 AM] Project 'src/logic/tsconfig.json' is out of date because oldest output 'src/logic/index.js' is older than newest input 'src/core' +[12:00:44 AM] Project 'src/logic/tsconfig.json' is out of date because oldest output 'src/logic/index.js.map' is older than newest input 'src/core' -[12:04:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:45 AM] Building project '/src/logic/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -471,9 +484,9 @@ src/core/anotherModule.d.ts File is output of project reference source 'src/core/anotherModule.ts' src/logic/index.ts Matched by include pattern '**/*' in 'src/logic/tsconfig.json' -[12:04:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/core' +[12:00:51 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/core' -[12:04:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:52 AM] Building project '/src/tests/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -522,7 +535,7 @@ exports.someClass = someClass; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -541,7 +554,7 @@ exports.someClass = someClass; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -569,7 +582,7 @@ exports.someClass = someClass; ] }, "version": "FakeTSVersion", - "size": 1420 + "size": 1502 } //// [/src/logic/index.d.ts] file written with same contents @@ -742,16 +755,16 @@ class someClass2 { } Output:: /lib/tsc --b /src/tests --explainFiles --v -[12:07:00 AM] Projects in this build: +[12:00:58 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:07:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' +[12:00:59 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' -[12:07:00 AM] Building project '/src/core/tsconfig.json'... +[12:01:00 AM] Building project '/src/core/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... +[12:01:06 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... lib/lib.d.ts Default library for target 'es3' @@ -761,13 +774,13 @@ src/core/index.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' src/core/some_decl.d.ts Matched by include pattern '**/*' in 'src/core/tsconfig.json' -[12:07:00 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:01:11 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... +[12:01:13 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... -[12:07:00 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:01:18 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... +[12:01:20 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -797,7 +810,7 @@ var someClass2 = /** @class */ (function () { //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -816,7 +829,7 @@ var someClass2 = /** @class */ (function () { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", @@ -844,7 +857,7 @@ var someClass2 = /** @class */ (function () { ] }, "version": "FakeTSVersion", - "size": 1442 + "size": 1524 } //// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js b/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js index 84b2e0f83ac..6d248452c79 100644 --- a/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js +++ b/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js @@ -1,32 +1,65 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.d.ts] - +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] @@ -40,18 +73,85 @@ Input:: } //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -70,15 +170,99 @@ Input:: //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -97,23 +281,114 @@ Input:: } //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} + +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --dry -[12:00:00 AM] Project '/src/core/tsconfig.json' is up to date +[12:00:23 AM] Project '/src/core/tsconfig.json' is up to date -[12:00:00 AM] Project '/src/logic/tsconfig.json' is up to date +[12:00:24 AM] Project '/src/logic/tsconfig.json' is up to date -[12:00:00 AM] Project '/src/tests/tsconfig.json' is up to date +[12:00:25 AM] Project '/src/tests/tsconfig.json' is up to date exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js b/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js index a17ef3b4182..e67f096921f 100644 --- a/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js +++ b/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js @@ -123,7 +123,55 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1352 +} //// [/user/username/projects/logic/index.js.map] {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} @@ -148,7 +196,72 @@ export declare const m: typeof mod; //// [/user/username/projects/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1469 +} //// [/user/username/projects/tests/index.js] "use strict"; @@ -168,7 +281,85 @@ export declare const m: typeof mod; //// [/user/username/projects/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} + +//// [/user/username/projects/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1614 +} Project should still be upto date: UpToDate @@ -205,6 +396,71 @@ function foo() { } //// [/user/username/projects/logic/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-2207004071-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() {}","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-2207004071-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() {}", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1486 +} + non Dts change to logic:: After building next project Output:: @@ -259,6 +515,71 @@ export declare class cNew { //// [/user/username/projects/logic/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5994214602-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() {}export class cNew {}","signature":"-10890883855-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare class cNew {\n}\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5994214602-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() {}export class cNew {}", + "signature": "-10890883855-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare class cNew {\n}\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1539 +} + Dts change to Logic:: After building next project Output:: @@ -268,3 +589,81 @@ Output:: //// [/user/username/projects/tests/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-10890883855-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare class cNew {\n}\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +//// [/user/username/projects/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-10890883855-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare class cNew {\n}\n", + "signature": "-10890883855-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare class cNew {\n}\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1647 +} + diff --git a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js index c3206a0f47b..df09baa7642 100644 --- a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js @@ -89,9 +89,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -150,7 +163,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -169,11 +182,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -197,7 +210,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -223,7 +236,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -238,6 +251,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -256,7 +272,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -273,7 +289,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -285,7 +300,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -306,7 +321,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -348,7 +363,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -371,9 +386,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -385,7 +398,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } @@ -447,7 +460,7 @@ exports.someClass = someClass; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -466,7 +479,7 @@ exports.someClass = someClass; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -494,7 +507,7 @@ exports.someClass = someClass; ] }, "version": "FakeTSVersion", - "size": 1420 + "size": 1502 } //// [/src/logic/index.d.ts] file written with same contents @@ -699,7 +712,7 @@ var someClass2 = /** @class */ (function () { //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -718,7 +731,7 @@ var someClass2 = /** @class */ (function () { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", @@ -746,7 +759,7 @@ var someClass2 = /** @class */ (function () { ] }, "version": "FakeTSVersion", - "size": 1442 + "size": 1524 } //// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/sample1/listFiles.js b/tests/baselines/reference/tsbuild/sample1/listFiles.js index 9174e4e8e10..15474e1e566 100644 --- a/tests/baselines/reference/tsbuild/sample1/listFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/listFiles.js @@ -89,9 +89,22 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} @@ -149,7 +162,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -168,11 +181,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -196,7 +209,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -222,7 +235,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -237,6 +250,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -255,7 +271,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -272,7 +288,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -284,7 +299,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -305,7 +320,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -347,7 +362,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -370,9 +385,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -384,7 +397,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } @@ -448,7 +461,7 @@ exports.someClass = someClass; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -467,7 +480,7 @@ exports.someClass = someClass; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -495,7 +508,7 @@ exports.someClass = someClass; ] }, "version": "FakeTSVersion", - "size": 1420 + "size": 1502 } //// [/src/logic/index.d.ts] file written with same contents @@ -700,7 +713,7 @@ var someClass2 = /** @class */ (function () { //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -719,7 +732,7 @@ var someClass2 = /** @class */ (function () { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", @@ -747,7 +760,7 @@ var someClass2 = /** @class */ (function () { ] }, "version": "FakeTSVersion", - "size": 1442 + "size": 1524 } //// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js index 61c95ca69f0..9815aec4bd2 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js @@ -19,9 +19,13 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] @@ -35,9 +39,17 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] @@ -61,7 +73,55 @@ declare const dts: any; } //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] export declare function getSecondsInDay(): number; @@ -70,10 +130,20 @@ export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] import * as c from '../core/index'; @@ -100,7 +170,72 @@ export const m = mod; //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] import * as mod from '../core/anotherModule'; @@ -108,6 +243,15 @@ export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] @@ -137,168 +281,7 @@ export const m = mod; } //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} - -//// [/src/ui/index.ts] - - -//// [/src/ui/tsconfig.json] - - - - -Output:: -/lib/tsc --b /src/tests --verbose -[12:00:00 AM] Projects in this build: - * src/core/tsconfig.json - * src/logic/tsconfig.json - * src/tests/tsconfig.json - -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/core/tsconfig.json'... - -[12:00:00 AM] Project 'src/logic/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/logic/tsconfig.json'... - -[12:00:00 AM] Project 'src/tests/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' - -[12:00:00 AM] Building project '/src/tests/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/core/anotherModule.d.ts] file written with same contents -//// [/src/core/anotherModule.d.ts.map] file written with same contents -//// [/src/core/anotherModule.js] file written with same contents -//// [/src/core/index.d.ts] file written with same contents -//// [/src/core/index.d.ts.map] file written with same contents -//// [/src/core/index.js] file written with same contents -//// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSCurrentVersion"} - -//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "./anothermodule.ts", - "./index.ts", - "./some_decl.d.ts" - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./anothermodule.ts": { - "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" - }, - "./index.ts": { - "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true - } - }, - "options": { - "composite": true, - "declaration": true, - "declarationMap": true, - "skipDefaultLibCheck": true - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "./anothermodule.ts", - "./index.ts", - "./some_decl.d.ts" - ] - }, - "version": "FakeTSCurrentVersion", - "size": 1141 -} - -//// [/src/logic/index.d.ts] file written with same contents -//// [/src/logic/index.js] file written with same contents -//// [/src/logic/index.js.map] file written with same contents -//// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSCurrentVersion"} - -//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "./index.ts" - ], - "fileNamesList": [ - [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../core/index.d.ts": { - "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", - "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - }, - "../core/anothermodule.d.ts": { - "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", - "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" - }, - "./index.ts": { - "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" - } - }, - "options": { - "composite": true, - "declaration": true, - "skipDefaultLibCheck": true, - "sourceMap": true - }, - "referencedMap": { - "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - }, - "exportedModulesMap": { - "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../core/anothermodule.d.ts", - "../core/index.d.ts", - "./index.ts" - ] - }, - "version": "FakeTSCurrentVersion", - "size": 1377 -} - -//// [/src/tests/index.d.ts] file written with same contents -//// [/src/tests/index.js] file written with same contents -//// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSCurrentVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -340,7 +323,7 @@ exitCode:: ExitStatus.Success }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -363,10 +346,262 @@ exitCode:: ExitStatus.Success "../core/anothermodule.d.ts" ], "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} + +//// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} + + +//// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} + + + + +Output:: +/lib/tsc --b /src/tests --verbose +[12:00:23 AM] Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +[12:00:24 AM] Project 'src/core/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:25 AM] Building project '/src/core/tsconfig.json'... + +[12:00:34 AM] Project 'src/logic/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:35 AM] Building project '/src/logic/tsconfig.json'... + +[12:00:41 AM] Project 'src/tests/tsconfig.json' is out of date because output for it was generated with version 'FakeTSVersion' that differs with current version 'FakeTSCurrentVersion' + +[12:00:42 AM] Building project '/src/tests/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/core/anotherModule.d.ts] file written with same contents +//// [/src/core/anotherModule.d.ts.map] file written with same contents +//// [/src/core/anotherModule.js] file written with same contents +//// [/src/core/index.d.ts] file written with same contents +//// [/src/core/index.d.ts.map] file written with same contents +//// [/src/core/index.js] file written with same contents +//// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSCurrentVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSCurrentVersion", + "size": 1438 +} + +//// [/src/logic/index.d.ts] file written with same contents +//// [/src/logic/index.js] file written with same contents +//// [/src/logic/index.js.map] file written with same contents +//// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSCurrentVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSCurrentVersion", + "size": 1562 +} + +//// [/src/tests/index.d.ts] file written with same contents +//// [/src/tests/index.js] file written with same contents +//// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSCurrentVersion"} + +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ "../core/index.d.ts", "../core/anothermodule.d.ts", "../logic/index.d.ts" ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] }, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", @@ -377,6 +612,6 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSCurrentVersion", - "size": 1585 + "size": 1709 } diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js index da09fdfc308..3f96dc28c2d 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js @@ -19,9 +19,13 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] @@ -35,9 +39,17 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] @@ -61,7 +73,55 @@ declare const dts: any; } //// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] export declare function getSecondsInDay(): number; @@ -70,10 +130,20 @@ export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] import * as c from '../core/index'; @@ -100,7 +170,72 @@ export const m = mod; //// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] import * as mod from '../core/anotherModule'; @@ -108,6 +243,15 @@ export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] @@ -137,163 +281,8 @@ export const m = mod; } //// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} - -//// [/src/ui/index.ts] - - -//// [/src/ui/tsconfig.json] - - - - -Output:: -/lib/tsc --b /src/tests --verbose --force -[12:00:00 AM] Projects in this build: - * src/core/tsconfig.json - * src/logic/tsconfig.json - * src/tests/tsconfig.json - -[12:00:00 AM] Project 'src/core/tsconfig.json' is being forcibly rebuilt - -[12:00:00 AM] Building project '/src/core/tsconfig.json'... - -[12:00:00 AM] Project 'src/logic/tsconfig.json' is being forcibly rebuilt - -[12:00:00 AM] Building project '/src/logic/tsconfig.json'... - -[12:00:00 AM] Project 'src/tests/tsconfig.json' is being forcibly rebuilt - -[12:00:00 AM] Building project '/src/tests/tsconfig.json'... - -exitCode:: ExitStatus.Success - - -//// [/src/core/anotherModule.d.ts] file written with same contents -//// [/src/core/anotherModule.d.ts.map] file written with same contents -//// [/src/core/anotherModule.js] file written with same contents -//// [/src/core/index.d.ts] file written with same contents -//// [/src/core/index.d.ts.map] file written with same contents -//// [/src/core/index.js] file written with same contents -//// [/src/core/tsconfig.tsbuildinfo] file written with same contents -//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "./anothermodule.ts", - "./index.ts", - "./some_decl.d.ts" - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "./anothermodule.ts": { - "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" - }, - "./index.ts": { - "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n", - "affectsGlobalScope": true - } - }, - "options": { - "composite": true, - "declaration": true, - "declarationMap": true, - "skipDefaultLibCheck": true - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "./anothermodule.ts", - "./index.ts", - "./some_decl.d.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1134 -} - -//// [/src/logic/index.d.ts] file written with same contents -//// [/src/logic/index.js] file written with same contents -//// [/src/logic/index.js.map] file written with same contents -//// [/src/logic/tsconfig.tsbuildinfo] file written with same contents -//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../lib/lib.d.ts", - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "./index.ts" - ], - "fileNamesList": [ - [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - ], - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "affectsGlobalScope": true - }, - "../core/index.d.ts": { - "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", - "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - }, - "../core/anothermodule.d.ts": { - "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", - "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" - }, - "./index.ts": { - "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" - } - }, - "options": { - "composite": true, - "declaration": true, - "skipDefaultLibCheck": true, - "sourceMap": true - }, - "referencedMap": { - "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - }, - "exportedModulesMap": { - "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../core/anothermodule.d.ts", - "../core/index.d.ts", - "./index.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1370 -} - -//// [/src/tests/index.d.ts] file written with same contents -//// [/src/tests/index.js] file written with same contents -//// [/src/tests/tsconfig.tsbuildinfo] file written with same contents //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { @@ -334,7 +323,7 @@ exitCode:: ExitStatus.Success }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -357,9 +346,7 @@ exitCode:: ExitStatus.Success "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -371,6 +358,66 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } +//// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} + + +//// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} + + + + +Output:: +/lib/tsc --b /src/tests --verbose --force +[12:00:23 AM] Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +[12:00:24 AM] Project 'src/core/tsconfig.json' is being forcibly rebuilt + +[12:00:25 AM] Building project '/src/core/tsconfig.json'... + +[12:00:34 AM] Project 'src/logic/tsconfig.json' is being forcibly rebuilt + +[12:00:35 AM] Building project '/src/logic/tsconfig.json'... + +[12:00:41 AM] Project 'src/tests/tsconfig.json' is being forcibly rebuilt + +[12:00:42 AM] Building project '/src/tests/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/src/core/anotherModule.d.ts] file written with same contents +//// [/src/core/anotherModule.d.ts.map] file written with same contents +//// [/src/core/anotherModule.js] file written with same contents +//// [/src/core/index.d.ts] file written with same contents +//// [/src/core/index.d.ts.map] file written with same contents +//// [/src/core/index.js] file written with same contents +//// [/src/core/tsconfig.tsbuildinfo] file written with same contents +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/logic/index.d.ts] file written with same contents +//// [/src/logic/index.js] file written with same contents +//// [/src/logic/index.js.map] file written with same contents +//// [/src/logic/tsconfig.tsbuildinfo] file written with same contents +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/tests/index.d.ts] file written with same contents +//// [/src/tests/index.js] file written with same contents +//// [/src/tests/tsconfig.tsbuildinfo] file written with same contents +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js index ac6b8570cfe..7f358a2228e 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js @@ -92,31 +92,44 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:01:00 AM] Projects in this build: +[12:00:08 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:09 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:10 AM] Building project '/src/core/tsconfig.json'... -[12:01:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:19 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:01:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:20 AM] Building project '/src/logic/tsconfig.json'... -[12:01:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:26 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:01:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:27 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -156,7 +169,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -175,11 +188,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -203,7 +216,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -229,7 +242,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -244,6 +257,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -262,7 +278,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -279,7 +295,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -291,7 +306,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -312,7 +327,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"target":0},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"target":0},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -354,7 +369,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -378,9 +393,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -392,7 +405,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1589 + "size": 1713 } @@ -406,18 +419,18 @@ Input:: Output:: /lib/tsc --b /src/tests --verbose -[12:04:00 AM] Projects in this build: +[12:00:33 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' +[12:00:34 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' -[12:04:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:00:35 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:04:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.base.json' +[12:00:36 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.base.json' -[12:04:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:37 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -425,7 +438,7 @@ exitCode:: ExitStatus.Success //// [/src/tests/index.d.ts] file written with same contents //// [/src/tests/index.js] file written with same contents //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -467,7 +480,7 @@ exitCode:: ExitStatus.Success }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -490,9 +503,7 @@ exitCode:: ExitStatus.Success "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -504,6 +515,6 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } diff --git a/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js b/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js index 4c29fd36810..e1550c07946 100644 --- a/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js +++ b/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js @@ -1,32 +1,65 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/core/anotherModule.d.ts] - +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map //// [/src/core/anotherModule.d.ts.map] - +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} //// [/src/core/anotherModule.js] +"use strict"; +exports.__esModule = true; +exports.World = void 0; +exports.World = "hello"; //// [/src/core/anotherModule.ts] +export const World = "hello"; //// [/src/core/index.d.ts] - +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] - +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; //// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } //// [/src/core/some_decl.d.ts] +declare const dts: any; //// [/src/core/tsconfig.json] @@ -40,18 +73,85 @@ Input:: } //// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1431 +} //// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/logic/index.js] - +"use strict"; +exports.__esModule = true; +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map //// [/src/logic/index.js.map] - +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] @@ -70,15 +170,99 @@ Input:: //// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} //// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; //// [/src/tests/index.js] +"use strict"; +exports.__esModule = true; +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] @@ -97,12 +281,103 @@ Input:: } //// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1702 +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} diff --git a/tests/baselines/reference/tsbuild/sample1/sample.js b/tests/baselines/reference/tsbuild/sample1/sample.js index 70d60d5a021..056af692914 100644 --- a/tests/baselines/reference/tsbuild/sample1/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/sample.js @@ -89,31 +89,44 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:01:00 AM] Projects in this build: +[12:00:06 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:07 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:08 AM] Building project '/src/core/tsconfig.json'... -[12:01:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:17 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:01:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:18 AM] Building project '/src/logic/tsconfig.json'... -[12:01:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:24 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:01:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:25 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -318,7 +331,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -337,11 +350,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -365,7 +378,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -516,7 +529,7 @@ sourceFile:index.ts >>>//# sourceMappingURL=index.js.map //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -531,6 +544,9 @@ sourceFile:index.ts [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -549,7 +565,7 @@ sourceFile:index.ts }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -566,7 +582,6 @@ sourceFile:index.ts }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -578,7 +593,7 @@ sourceFile:index.ts ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -599,7 +614,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -641,7 +656,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -664,9 +679,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -678,7 +691,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } @@ -696,24 +709,24 @@ export class someClass { } Output:: /lib/tsc --b /src/tests --verbose -[12:04:00 AM] Projects in this build: +[12:00:34 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' +[12:00:35 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' -[12:04:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:36 AM] Building project '/src/core/tsconfig.json'... -[12:04:00 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... +[12:00:42 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... -[12:04:00 AM] Project 'src/logic/tsconfig.json' is out of date because oldest output 'src/logic/index.js' is older than newest input 'src/core' +[12:00:47 AM] Project 'src/logic/tsconfig.json' is out of date because oldest output 'src/logic/index.js.map' is older than newest input 'src/core' -[12:04:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:48 AM] Building project '/src/logic/tsconfig.json'... -[12:04:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/core' +[12:00:54 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/core' -[12:04:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:55 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -899,7 +912,7 @@ exports.someClass = someClass; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -918,7 +931,7 @@ exports.someClass = someClass; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -946,7 +959,7 @@ exports.someClass = someClass; ] }, "version": "FakeTSVersion", - "size": 1420 + "size": 1502 } //// [/src/logic/index.d.ts] file written with same contents @@ -1120,24 +1133,24 @@ class someClass2 { } Output:: /lib/tsc --b /src/tests --verbose -[12:07:00 AM] Projects in this build: +[12:01:03 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:07:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' +[12:01:04 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' -[12:07:00 AM] Building project '/src/core/tsconfig.json'... +[12:01:05 AM] Building project '/src/core/tsconfig.json'... -[12:07:00 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... +[12:01:11 AM] Updating unchanged output timestamps of project '/src/core/tsconfig.json'... -[12:07:00 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:01:16 AM] Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... +[12:01:18 AM] Updating output timestamps of project '/src/logic/tsconfig.json'... -[12:07:00 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies +[12:01:23 AM] Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies -[12:07:00 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... +[12:01:25 AM] Updating output timestamps of project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -1180,7 +1193,7 @@ var someClass2 = /** @class */ (function () { //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1199,7 +1212,7 @@ var someClass2 = /** @class */ (function () { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", @@ -1227,7 +1240,7 @@ var someClass2 = /** @class */ (function () { ] }, "version": "FakeTSVersion", - "size": 1442 + "size": 1524 } //// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time @@ -1257,20 +1270,20 @@ Input:: Output:: /lib/tsc --b /src/tests --verbose -[12:10:00 AM] Projects in this build: +[12:01:31 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:10:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/anotherModule.js' +[12:01:32 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/index.js' -[12:10:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/decls/index.d.ts' does not exist +[12:01:33 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/decls/index.d.ts' does not exist -[12:10:00 AM] Building project '/src/logic/tsconfig.json'... +[12:01:34 AM] Building project '/src/logic/tsconfig.json'... -[12:10:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/logic' +[12:01:41 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/logic' -[12:10:00 AM] Building project '/src/tests/tsconfig.json'... +[12:01:42 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -1457,16 +1470,16 @@ Input:: Output:: /lib/tsc --b /src/tests --verbose -[12:13:00 AM] Projects in this build: +[12:01:48 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:13:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/anotherModule.js' +[12:01:49 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/index.ts' is older than oldest output 'src/core/index.js' -[12:13:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:01:50 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:13:00 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' +[12:01:51 AM] Project 'src/tests/tsconfig.json' is up to date because newest input 'src/tests/index.ts' is older than oldest output 'src/tests/index.js' exitCode:: ExitStatus.Success readFiles:: { diff --git a/tests/baselines/reference/tsbuild/sample1/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-declaration-option-changes.js index fd1c36b24fc..8cbc1cb6170 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-declaration-option-changes.js @@ -37,33 +37,84 @@ declare const dts: any; } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/core --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success @@ -150,12 +201,12 @@ Input:: Output:: /lib/tsc --b /src/core --verbose -[12:04:00 AM] Projects in this build: +[12:00:15 AM] Projects in this build: * src/core/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.d.ts' does not exist +[12:00:16 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.d.ts' does not exist -[12:04:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:17 AM] Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success @@ -173,7 +224,7 @@ export declare function multiply(a: number, b: number): number; //// [/src/core/index.js] file written with same contents //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -192,11 +243,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -218,6 +269,6 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 1095 + "size": 1392 } diff --git a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js index 1db9a0891c2..8d12675ce94 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js @@ -90,31 +90,44 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... -[12:01:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:18 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:01:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:19 AM] Building project '/src/logic/tsconfig.json'... -[12:01:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:25 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:01:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:26 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -154,7 +167,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -173,11 +186,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -201,7 +214,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -227,7 +240,7 @@ exports.m = mod; {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} //// [/src/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -242,6 +255,9 @@ exports.m = mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -260,7 +276,7 @@ exports.m = mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -277,7 +293,6 @@ exports.m = mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -289,7 +304,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1555 } //// [/src/tests/index.d.ts] @@ -310,7 +325,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"esModuleInterop":false,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"esModuleInterop":false,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -352,7 +367,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -376,9 +391,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -390,7 +403,7 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1602 + "size": 1726 } @@ -417,18 +430,18 @@ Input:: Output:: /lib/tsc --b /src/tests --verbose -[12:04:00 AM] Projects in this build: +[12:00:32 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' +[12:00:33 AM] Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' -[12:04:00 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' +[12:00:34 AM] Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js.map' -[12:04:00 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.json' +[12:00:35 AM] Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.json' -[12:04:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:36 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success @@ -470,7 +483,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -512,7 +525,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -536,9 +549,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -550,6 +561,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1601 + "size": 1725 } diff --git a/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js index 74cbc2bcd35..ce034e806bb 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js @@ -90,31 +90,44 @@ export const m = mod; } //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/tests --verbose -[12:00:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json * src/logic/tsconfig.json * src/tests/tsconfig.json -[12:00:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:00:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... -[12:00:00 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist +[12:00:18 AM] Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist -[12:00:00 AM] Building project '/src/logic/tsconfig.json'... +[12:00:19 AM] Building project '/src/logic/tsconfig.json'... -[12:00:00 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist +[12:00:25 AM] Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist -[12:00:00 AM] Building project '/src/tests/tsconfig.json'... +[12:00:26 AM] Building project '/src/tests/tsconfig.json'... exitCode:: ExitStatus.Success readFiles:: { @@ -319,7 +332,7 @@ exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -338,11 +351,11 @@ exports.multiply = multiply; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", @@ -366,7 +379,7 @@ exports.multiply = multiply; ] }, "version": "FakeTSVersion", - "size": 1134 + "size": 1431 } //// [/src/logic/index.d.ts] @@ -517,7 +530,7 @@ sourceFile:index.ts >>>//# sourceMappingURL=index.js.map //// [/src/logic/ownFile.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true,"tsBuildInfoFile":"./ownFile.tsbuildinfo"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true,"tsBuildInfoFile":"./ownFile.tsbuildinfo"},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/logic/ownFile.tsbuildinfo.readable.baseline.txt] { @@ -532,6 +545,9 @@ sourceFile:index.ts [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -550,7 +566,7 @@ sourceFile:index.ts }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -568,7 +584,6 @@ sourceFile:index.ts }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -580,7 +595,7 @@ sourceFile:index.ts ] }, "version": "FakeTSVersion", - "size": 1412 + "size": 1597 } //// [/src/tests/index.d.ts] @@ -601,7 +616,7 @@ exports.m = mod; //// [/src/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map","7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -643,7 +658,7 @@ exports.m = mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -666,9 +681,7 @@ exports.m = mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -680,6 +693,6 @@ exports.m = mod; ] }, "version": "FakeTSVersion", - "size": 1578 + "size": 1702 } diff --git a/tests/baselines/reference/tsbuild/sample1/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-module-option-changes.js index 3c2e06d97f5..a7ff8600d95 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-module-option-changes.js @@ -37,33 +37,84 @@ declare const dts: any; } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/core --verbose -[12:01:00 AM] Projects in this build: +[12:00:07 AM] Projects in this build: * src/core/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:08 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:09 AM] Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success @@ -150,12 +201,12 @@ Input:: Output:: /lib/tsc --b /src/core --verbose -[12:04:00 AM] Projects in this build: +[12:00:15 AM] Projects in this build: * src/core/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' +[12:00:16 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' -[12:04:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:17 AM] Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/sample1/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-target-option-changes.js index 70b3f9fd2ab..fc6789357bc 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-target-option-changes.js @@ -47,33 +47,84 @@ declare const dts: any; } //// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../core" } + ] +} //// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; //// [/src/tests/tsconfig.json] - +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" } + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} //// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} //// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} Output:: /lib/tsc --b /src/core --verbose -[12:01:00 AM] Projects in this build: +[12:00:10 AM] Projects in this build: * src/core/tsconfig.json -[12:01:00 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist +[12:00:11 AM] Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist -[12:01:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:12 AM] Building project '/src/core/tsconfig.json'... TSFILE: /src/core/anotherModule.js TSFILE: /src/core/index.js @@ -168,12 +219,12 @@ Input:: Output:: /lib/tsc --b /src/core --verbose -[12:04:00 AM] Projects in this build: +[12:00:18 AM] Projects in this build: * src/core/tsconfig.json -[12:04:00 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' +[12:00:19 AM] Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' -[12:04:00 AM] Building project '/src/core/tsconfig.json'... +[12:00:20 AM] Building project '/src/core/tsconfig.json'... TSFILE: /src/core/anotherModule.js TSFILE: /src/core/index.js diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js index 2251184ac9d..c26dfd38b38 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js @@ -110,7 +110,7 @@ a_1.X; //// [/src/tsconfig.a.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-8566332115-export class A {}\r\n"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-8566332115-export class A {}\r\n","signature":"-9529994156-export declare class A {\r\n}\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/tsconfig.a.tsbuildinfo.readable.baseline.txt] { @@ -127,7 +127,7 @@ a_1.X; }, "./a.ts": { "version": "-8566332115-export class A {}\r\n", - "signature": "-8566332115-export class A {}\r\n" + "signature": "-9529994156-export declare class A {\r\n}\r\n" } }, "options": { @@ -141,11 +141,11 @@ a_1.X; ] }, "version": "FakeTSVersion", - "size": 716 + "size": 788 } //// [/src/tsconfig.b.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9529994156-export declare class A {\r\n}\r\n","-17186364832-import {A} from 'a';\nexport const b = new A();"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9529994156-export declare class A {\r\n}\r\n",{"version":"-17186364832-import {A} from 'a';\nexport const b = new A();","signature":"-9520743082-import { A } from 'a';\r\nexport declare const b: A;\r\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/tsconfig.b.tsbuildinfo.readable.baseline.txt] { @@ -172,7 +172,7 @@ a_1.X; }, "./b.ts": { "version": "-17186364832-import {A} from 'a';\nexport const b = new A();", - "signature": "-17186364832-import {A} from 'a';\nexport const b = new A();" + "signature": "-9520743082-import { A } from 'a';\r\nexport declare const b: A;\r\n" } }, "options": { @@ -195,6 +195,6 @@ a_1.X; ] }, "version": "FakeTSVersion", - "size": 834 + "size": 929 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js index 39e43f277e7..f6c83225f3d 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js @@ -122,7 +122,7 @@ a_1.X; //// [/src/tsconfig.a.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-8566332115-export class A {}\r\n"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-8566332115-export class A {}\r\n","signature":"-9529994156-export declare class A {\r\n}\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/tsconfig.a.tsbuildinfo.readable.baseline.txt] { @@ -139,7 +139,7 @@ a_1.X; }, "./a.ts": { "version": "-8566332115-export class A {}\r\n", - "signature": "-8566332115-export class A {}\r\n" + "signature": "-9529994156-export declare class A {\r\n}\r\n" } }, "options": { @@ -153,11 +153,11 @@ a_1.X; ] }, "version": "FakeTSVersion", - "size": 716 + "size": 788 } //// [/src/tsconfig.b.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9529994156-export declare class A {\r\n}\r\n","-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9529994156-export declare class A {\r\n}\r\n",{"version":"-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n","signature":"-10067914302-import { A } from '@ref/a';\r\nexport declare const b: A;\r\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/tsconfig.b.tsbuildinfo.readable.baseline.txt] { @@ -184,7 +184,7 @@ a_1.X; }, "./b.ts": { "version": "-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n", - "signature": "-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n" + "signature": "-10067914302-import { A } from '@ref/a';\r\nexport declare const b: A;\r\n" } }, "options": { @@ -207,6 +207,6 @@ a_1.X; ] }, "version": "FakeTSVersion", - "size": 845 + "size": 946 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js b/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js index a8eaca63553..5be12342377 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js @@ -23,9 +23,14 @@ import {A} from 'a'; export const b = new A(); //// [/src/c.ts] - +import {b} from './b'; +import {X} from "@ref/a"; +b; +X; //// [/src/refs/a.d.ts] +export class X {} +export class A {} //// [/src/tsconfig.a.json] @@ -85,7 +90,7 @@ exports.A = A; //// [/src/tsconfig.a.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-8566332115-export class A {}\r\n"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-8566332115-export class A {}\r\n","signature":"-9529994156-export declare class A {\r\n}\r\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/src/tsconfig.a.tsbuildinfo.readable.baseline.txt] { @@ -102,7 +107,7 @@ exports.A = A; }, "./a.ts": { "version": "-8566332115-export class A {}\r\n", - "signature": "-8566332115-export class A {}\r\n" + "signature": "-9529994156-export declare class A {\r\n}\r\n" } }, "options": { @@ -116,7 +121,7 @@ exports.A = A; ] }, "version": "FakeTSVersion", - "size": 716 + "size": 788 } //// [/src/tsconfig.b.tsbuildinfo] diff --git a/tests/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js b/tests/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js index 62e75a21495..2b7648cb5a4 100644 --- a/tests/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js +++ b/tests/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js @@ -248,7 +248,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/demo/core/utilities.ts (used version) +/user/username/projects/demo/core/utilities.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/demo/animals/animal.ts","/user/username/projects/demo/animals/dog.ts","/user/username/projects/demo/animals/index.ts"] Program options: {"declaration":true,"target":1,"module":1,"strict":true,"noUnusedLocals":true,"noUnusedParameters":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"composite":true,"outDir":"/user/username/projects/demo/lib/animals","rootDir":"/user/username/projects/demo/animals","watch":true,"configFilePath":"/user/username/projects/demo/animals/tsconfig.json"} @@ -269,10 +269,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/demo/animals/animal.ts (used version) -/user/username/projects/demo/animals/index.ts (used version) +/user/username/projects/demo/animals/animal.ts (computed .d.ts during emit) +/user/username/projects/demo/animals/index.ts (computed .d.ts during emit) /user/username/projects/demo/lib/core/utilities.d.ts (used version) -/user/username/projects/demo/animals/dog.ts (used version) +/user/username/projects/demo/animals/dog.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/demo/zoo/zoo.ts"] Program options: {"declaration":true,"target":1,"module":1,"strict":true,"noUnusedLocals":true,"noUnusedParameters":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"composite":true,"outDir":"/user/username/projects/demo/lib/zoo","rootDir":"/user/username/projects/demo/zoo","watch":true,"configFilePath":"/user/username/projects/demo/zoo/tsconfig.json"} @@ -296,7 +296,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/demo/lib/animals/animal.d.ts (used version) /user/username/projects/demo/lib/animals/dog.d.ts (used version) /user/username/projects/demo/lib/animals/index.d.ts (used version) -/user/username/projects/demo/zoo/zoo.ts (used version) +/user/username/projects/demo/zoo/zoo.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/demo/animals/tsconfig.json: @@ -354,7 +354,7 @@ export declare function lastElementOf(arr: T[]): T | undefined; //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -371,7 +371,7 @@ export declare function lastElementOf(arr: T[]): T | undefined; }, "../../core/utilities.ts": { "version": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n", - "signature": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n" + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" } }, "options": { @@ -395,7 +395,7 @@ export declare function lastElementOf(arr: T[]): T | undefined; ] }, "version": "FakeTSVersion", - "size": 1160 + "size": 1319 } //// [/user/username/projects/demo/lib/animals/animal.js] @@ -452,7 +452,7 @@ export declare function createDog(): Dog; //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n","-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","signature":"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n"},{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -472,6 +472,9 @@ export declare function createDog(): Dog; [ "../../animals/animal.ts", "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" ] ], "fileInfos": { @@ -482,11 +485,11 @@ export declare function createDog(): Dog; }, "../../animals/animal.ts": { "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", - "signature": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + "signature": "-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" }, "../../animals/index.ts": { "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", - "signature": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" }, "../core/utilities.d.ts": { "version": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", @@ -494,7 +497,7 @@ export declare function createDog(): Dog; }, "../../animals/dog.ts": { "version": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n", - "signature": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n" + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" } }, "options": { @@ -522,8 +525,7 @@ export declare function createDog(): Dog; }, "exportedModulesMap": { "../../animals/dog.ts": [ - "../../animals/index.ts", - "../core/utilities.d.ts" + "../../animals/index.ts" ], "../../animals/index.ts": [ "../../animals/animal.ts", @@ -539,7 +541,7 @@ export declare function createDog(): Dog; ] }, "version": "FakeTSVersion", - "size": 1911 + "size": 2423 } //// [/user/username/projects/demo/lib/zoo/zoo.js] @@ -561,7 +563,7 @@ export declare function createZoo(): Array; //// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"fileIdsList":[[4],[2,3]],"referencedMap":[[3,1],[4,2],[5,1]],"exportedModulesMap":[[3,1],[4,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n","signature":"10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"fileIdsList":[[4],[2,3]],"referencedMap":[[3,1],[4,2],[5,1]],"exportedModulesMap":[[3,1],[4,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -602,7 +604,7 @@ export declare function createZoo(): Array; }, "../../zoo/zoo.ts": { "version": "8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n", - "signature": "8797123924-import { Dog, createDog } from '../animals/index';\r\n\r\nexport function createZoo(): Array {\r\n return [\r\n createDog()\r\n ];\r\n}\r\n\r\n" + "signature": "10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n" } }, "options": { @@ -651,6 +653,6 @@ export declare function createZoo(): Array; ] }, "version": "FakeTSVersion", - "size": 1653 + "size": 1783 } diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js index ceff417c49b..3396771bc58 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js @@ -123,9 +123,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/packages/pkg2/const.ts (used version) -/user/username/projects/myproject/packages/pkg2/index.ts (used version) -/user/username/projects/myproject/packages/pkg2/other.ts (used version) +/user/username/projects/myproject/packages/pkg2/const.ts (computed .d.ts during emit) +/user/username/projects/myproject/packages/pkg2/index.ts (computed .d.ts during emit) +/user/username/projects/myproject/packages/pkg2/other.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} @@ -202,7 +202,7 @@ export declare type TheStr = string; //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts","../other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-11202312776-export type TheNum = 42;","-11225381282-export type { TheNum } from './const.js';","-4609154030-export type TheStr = string;"],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../../a/lib/lib.d.ts","../const.ts","../index.ts","../other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-11202312776-export type TheNum = 42;","signature":"-9649133742-export declare type TheNum = 42;\n"},{"version":"-11225381282-export type { TheNum } from './const.js';","signature":"-9660329432-export type { TheNum } from './const.js';\n"},{"version":"-4609154030-export type TheStr = string;","signature":"-10420741908-export declare type TheStr = string;\n"}],"options":{"composite":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -226,15 +226,15 @@ export declare type TheStr = string; }, "../const.ts": { "version": "-11202312776-export type TheNum = 42;", - "signature": "-11202312776-export type TheNum = 42;" + "signature": "-9649133742-export declare type TheNum = 42;\n" }, "../index.ts": { "version": "-11225381282-export type { TheNum } from './const.js';", - "signature": "-11225381282-export type { TheNum } from './const.js';" + "signature": "-9660329432-export type { TheNum } from './const.js';\n" }, "../other.ts": { "version": "-4609154030-export type TheStr = string;", - "signature": "-4609154030-export type TheStr = string;" + "signature": "-10420741908-export declare type TheStr = string;\n" } }, "options": { @@ -259,7 +259,7 @@ export declare type TheStr = string; ] }, "version": "FakeTSVersion", - "size": 841 + "size": 1074 } //// [/user/username/projects/myproject/packages/pkg1/build/index.js] diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js index 465f08c8b2d..69047ec74b8 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js @@ -7,7 +7,7 @@ import type { TheNum } from 'pkg2' export const theNum: TheNum = 42; //// [/user/username/projects/myproject/packages/pkg1/tsconfig.json] -{"compilerOptions":{"outDir":"build","module":"node12"},"references":[{"path":"../pkg2"}]} +{"compilerOptions":{"outDir":"build","module":"node16"},"references":[{"path":"../pkg2"}]} //// [/user/username/projects/myproject/packages/pkg2/const.cts] export type TheNum = 42; @@ -16,13 +16,13 @@ export type TheNum = 42; export type { TheNum } from './const.cjs'; //// [/user/username/projects/myproject/packages/pkg2/tsconfig.json] -{"compilerOptions":{"composite":true,"outDir":"build","module":"node12"}} +{"compilerOptions":{"composite":true,"outDir":"build","module":"node16"}} //// [/user/username/projects/myproject/packages/pkg2/package.json] {"name":"pkg2","version":"1.0.0","main":"build/index.js","type":"module"} //// [/user/username/projects/myproject/node_modules/pkg2] symlink(/user/username/projects/myproject/packages/pkg2) -//// [/a/lib/lib.es2020.full.d.ts] +//// [/a/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -52,7 +52,7 @@ Output:: Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package.json'. 'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file type 'TypeScript'. File name '/user/username/projects/myproject/packages/pkg2/const.cjs' has a '.cjs' extension - stripping it. File '/user/username/projects/myproject/packages/pkg2/const.cts' exist - use it as a name resolution result. @@ -67,7 +67,7 @@ File '/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. 'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. File '/user/username/projects/myproject/packages/pkg1/package.json' exists according to earlier cached lookups. Loading module 'pkg2' from 'node_modules' folder, target file type 'TypeScript'. Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. @@ -90,7 +90,7 @@ File '/user/username/projects/myproject/packages/pkg2/build/package.json' does n File '/user/username/projects/myproject/packages/pkg2/package.json' exists according to earlier cached lookups. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/build/const.cjs', target file type 'TypeScript'. File name '/user/username/projects/myproject/packages/pkg2/build/const.cjs' has a '.cjs' extension - stripping it. File '/user/username/projects/myproject/packages/pkg2/build/const.cts' does not exist. @@ -107,37 +107,37 @@ Program root files: ["/user/username/projects/myproject/packages/pkg2/const.cts" Program options: {"composite":true,"outDir":"/user/username/projects/myproject/packages/pkg2/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg2/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/const.cts /user/username/projects/myproject/packages/pkg2/index.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/const.cts /user/username/projects/myproject/packages/pkg2/index.ts Shape signatures in builder refreshed for:: -/a/lib/lib.es2020.full.d.ts (used version) -/user/username/projects/myproject/packages/pkg2/const.cts (used version) -/user/username/projects/myproject/packages/pkg2/index.ts (used version) +/a/lib/lib.es2022.full.d.ts (used version) +/user/username/projects/myproject/packages/pkg2/const.cts (computed .d.ts during emit) +/user/username/projects/myproject/packages/pkg2/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/build/const.d.cts /user/username/projects/myproject/packages/pkg2/build/index.d.ts /user/username/projects/myproject/packages/pkg1/index.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/build/const.d.cts /user/username/projects/myproject/packages/pkg2/build/index.d.ts /user/username/projects/myproject/packages/pkg1/index.ts Shape signatures in builder refreshed for:: -/a/lib/lib.es2020.full.d.ts (used version) +/a/lib/lib.es2022.full.d.ts (used version) /user/username/projects/myproject/packages/pkg2/build/const.d.cts (used version) /user/username/projects/myproject/packages/pkg2/build/index.d.ts (used version) /user/username/projects/myproject/packages/pkg1/index.ts (used version) @@ -198,13 +198,13 @@ export type { TheNum } from './const.cjs'; //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../../a/lib/lib.es2020.full.d.ts","../const.cts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-11202312776-export type TheNum = 42;","impliedFormat":1},{"version":"-9668872159-export type { TheNum } from './const.cjs';","impliedFormat":99}],"options":{"composite":true,"module":100,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../../a/lib/lib.es2022.full.d.ts","../const.cts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-11202312776-export type TheNum = 42;","signature":"-9649133742-export declare type TheNum = 42;\n","impliedFormat":1},{"version":"-9668872159-export type { TheNum } from './const.cjs';","signature":"-9835135925-export type { TheNum } from './const.cjs';\n","impliedFormat":99}],"options":{"composite":true,"module":100,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../../../../a/lib/lib.es2020.full.d.ts", + "../../../../../../../a/lib/lib.es2022.full.d.ts", "../const.cts", "../index.ts" ], @@ -214,7 +214,7 @@ export type { TheNum } from './const.cjs'; ] ], "fileInfos": { - "../../../../../../../a/lib/lib.es2020.full.d.ts": { + "../../../../../../../a/lib/lib.es2022.full.d.ts": { "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "affectsGlobalScope": true, @@ -222,12 +222,12 @@ export type { TheNum } from './const.cjs'; }, "../const.cts": { "version": "-11202312776-export type TheNum = 42;", - "signature": "-11202312776-export type TheNum = 42;", + "signature": "-9649133742-export declare type TheNum = 42;\n", "impliedFormat": 1 }, "../index.ts": { "version": "-9668872159-export type { TheNum } from './const.cjs';", - "signature": "-9668872159-export type { TheNum } from './const.cjs';", + "signature": "-9835135925-export type { TheNum } from './const.cjs';\n", "impliedFormat": 99 } }, @@ -247,13 +247,13 @@ export type { TheNum } from './const.cjs'; ] }, "semanticDiagnosticsPerFile": [ - "../../../../../../../a/lib/lib.es2020.full.d.ts", + "../../../../../../../a/lib/lib.es2022.full.d.ts", "../const.cts", "../index.ts" ] }, "version": "FakeTSVersion", - "size": 887 + "size": 1019 } //// [/user/username/projects/myproject/packages/pkg1/build/index.js] @@ -279,7 +279,7 @@ Output:: Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. 'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. File '/user/username/projects/myproject/packages/pkg1/package.json' exists according to earlier cached lookups. Loading module 'pkg2' from 'node_modules' folder, target file type 'TypeScript'. Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. @@ -309,7 +309,7 @@ Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package 'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/build/const.cjs', target file type 'TypeScript'. File name '/user/username/projects/myproject/packages/pkg2/build/const.cjs' has a '.cjs' extension - stripping it. File '/user/username/projects/myproject/packages/pkg2/build/const.cts' does not exist. @@ -331,7 +331,7 @@ Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/build/const.d.cts /user/username/projects/myproject/packages/pkg2/build/index.d.ts /user/username/projects/myproject/packages/pkg1/index.ts @@ -399,7 +399,7 @@ Output:: Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. 'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. File '/user/username/projects/myproject/packages/pkg1/package.json' exists according to earlier cached lookups. Loading module 'pkg2' from 'node_modules' folder, target file type 'TypeScript'. Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. @@ -423,7 +423,7 @@ Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package 'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/build/const.cjs', target file type 'TypeScript'. File name '/user/username/projects/myproject/packages/pkg2/build/const.cjs' has a '.cjs' extension - stripping it. File '/user/username/projects/myproject/packages/pkg2/build/const.cts' does not exist. @@ -440,7 +440,7 @@ Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/build/const.d.cts /user/username/projects/myproject/packages/pkg2/build/index.d.ts /user/username/projects/myproject/packages/pkg1/index.ts @@ -509,7 +509,7 @@ Output:: Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. 'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. File '/user/username/projects/myproject/packages/pkg1/package.json' exists according to earlier cached lookups. Loading module 'pkg2' from 'node_modules' folder, target file type 'TypeScript'. Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. @@ -539,7 +539,7 @@ Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package 'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/build/const.cjs', target file type 'TypeScript'. File name '/user/username/projects/myproject/packages/pkg2/build/const.cjs' has a '.cjs' extension - stripping it. File '/user/username/projects/myproject/packages/pkg2/build/const.cts' does not exist. @@ -561,7 +561,7 @@ Program root files: ["/user/username/projects/myproject/packages/pkg1/index.ts"] Program options: {"outDir":"/user/username/projects/myproject/packages/pkg1/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg1/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/build/const.d.cts /user/username/projects/myproject/packages/pkg2/build/index.d.ts /user/username/projects/myproject/packages/pkg1/index.ts @@ -631,7 +631,7 @@ Output:: [12:01:40 AM] Building project '/user/username/projects/myproject/packages/pkg2/tsconfig.json'... ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.cts'. ======== -Module resolution kind is not specified, using 'Node12'. +Module resolution kind is not specified, using 'Node16'. Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file type 'TypeScript'. File '/user/username/projects/myproject/packages/pkg2/const.cjs.ts' does not exist. File '/user/username/projects/myproject/packages/pkg2/const.cjs.tsx' does not exist. @@ -650,7 +650,7 @@ Program root files: ["/user/username/projects/myproject/packages/pkg2/const.cts" Program options: {"composite":true,"outDir":"/user/username/projects/myproject/packages/pkg2/build","module":100,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/packages/pkg2/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2020.full.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/packages/pkg2/const.cts /user/username/projects/myproject/packages/pkg2/index.cts @@ -701,13 +701,13 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/packages/pkg2/build/const.cjs] file changed its modified time //// [/user/username/projects/myproject/packages/pkg2/build/const.d.cts] file changed its modified time //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../../a/lib/lib.es2020.full.d.ts","../const.cts","../index.cts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-11202312776-export type TheNum = 42;","impliedFormat":1},{"version":"-9668872159-export type { TheNum } from './const.cjs';","signature":"-9835135925-export type { TheNum } from './const.cjs';\n","impliedFormat":1}],"options":{"composite":true,"module":100,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../../a/lib/lib.es2022.full.d.ts","../const.cts","../index.cts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-11202312776-export type TheNum = 42;","signature":"-9649133742-export declare type TheNum = 42;\n","impliedFormat":1},{"version":"-9668872159-export type { TheNum } from './const.cjs';","signature":"-9835135925-export type { TheNum } from './const.cjs';\n","impliedFormat":1}],"options":{"composite":true,"module":100,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../../../../a/lib/lib.es2020.full.d.ts", + "../../../../../../../a/lib/lib.es2022.full.d.ts", "../const.cts", "../index.cts" ], @@ -717,7 +717,7 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../../../../a/lib/lib.es2020.full.d.ts": { + "../../../../../../../a/lib/lib.es2022.full.d.ts": { "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", "affectsGlobalScope": true, @@ -725,7 +725,7 @@ exitCode:: ExitStatus.undefined }, "../const.cts": { "version": "-11202312776-export type TheNum = 42;", - "signature": "-11202312776-export type TheNum = 42;", + "signature": "-9649133742-export declare type TheNum = 42;\n", "impliedFormat": 1 }, "../index.cts": { @@ -750,13 +750,13 @@ exitCode:: ExitStatus.undefined ] }, "semanticDiagnosticsPerFile": [ - "../../../../../../../a/lib/lib.es2020.full.d.ts", + "../../../../../../../a/lib/lib.es2022.full.d.ts", "../const.cts", "../index.cts" ] }, "version": "FakeTSVersion", - "size": 958 + "size": 1019 } //// [/user/username/projects/myproject/packages/pkg2/build/index.cjs] diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolutionCache/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js b/tests/baselines/reference/tsbuildWatch/moduleResolutionCache/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js index fca44bf5be1..9c07d419818 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolutionCache/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolutionCache/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js @@ -82,7 +82,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/project1/node_modules/file/index.d.ts (used version) -/user/username/projects/myproject/project1/index.ts (used version) +/user/username/projects/myproject/project1/index.ts (computed .d.ts during emit) /user/username/projects/myproject/node_modules/@types/foo/index.d.ts (used version) /user/username/projects/myproject/node_modules/@types/bar/index.d.ts (used version) @@ -104,7 +104,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/project2/file.d.ts (used version) -/user/username/projects/myproject/project2/index.ts (used version) +/user/username/projects/myproject/project2/index.ts (computed .d.ts during emit) /user/username/projects/myproject/node_modules/@types/foo/index.d.ts (used version) WatchedFiles:: @@ -144,7 +144,7 @@ export {}; //// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./node_modules/file/index.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts","../node_modules/@types/bar/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-12737086933-export const foo = 10;","-4708082513-import { foo } from \"file\";","-12737086933-export const foo = 10;","-12042713060-export const bar = 10;"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,5,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./node_modules/file/index.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts","../node_modules/@types/bar/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-12737086933-export const foo = 10;",{"version":"-4708082513-import { foo } from \"file\";","signature":"-3531856636-export {};\n"},"-12737086933-export const foo = 10;","-12042713060-export const bar = 10;"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,5,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -173,7 +173,7 @@ export {}; }, "./index.ts": { "version": "-4708082513-import { foo } from \"file\";", - "signature": "-4708082513-import { foo } from \"file\";" + "signature": "-3531856636-export {};\n" }, "../node_modules/@types/foo/index.d.ts": { "version": "-12737086933-export const foo = 10;", @@ -192,11 +192,7 @@ export {}; "./node_modules/file/index.d.ts" ] }, - "exportedModulesMap": { - "./index.ts": [ - "./node_modules/file/index.d.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../a/lib/lib.d.ts", "../node_modules/@types/bar/index.d.ts", @@ -206,7 +202,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 925 + "size": 971 } //// [/user/username/projects/myproject/project2/index.js] @@ -219,7 +215,7 @@ export {}; //// [/user/username/projects/myproject/project2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./file.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-12737086933-export const foo = 10;","-4708082513-import { foo } from \"file\";","-12737086933-export const foo = 10;"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,4,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./file.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-12737086933-export const foo = 10;",{"version":"-4708082513-import { foo } from \"file\";","signature":"-3531856636-export {};\n"},"-12737086933-export const foo = 10;"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/project2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -247,7 +243,7 @@ export {}; }, "./index.ts": { "version": "-4708082513-import { foo } from \"file\";", - "signature": "-4708082513-import { foo } from \"file\";" + "signature": "-3531856636-export {};\n" }, "../node_modules/@types/foo/index.d.ts": { "version": "-12737086933-export const foo = 10;", @@ -262,11 +258,7 @@ export {}; "./file.d.ts" ] }, - "exportedModulesMap": { - "./index.ts": [ - "./file.d.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../a/lib/lib.d.ts", "../node_modules/@types/foo/index.d.ts", @@ -275,7 +267,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 826 + "size": 872 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js b/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js index 68b8c770706..cdd4fcec999 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -172,7 +172,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -235,7 +235,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,11 +253,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -275,7 +275,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -301,7 +301,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,6 +316,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -334,7 +337,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -351,7 +354,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -363,7 +365,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -384,7 +386,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -426,7 +428,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -449,9 +451,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -463,6 +463,6 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js b/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js index 86b26975fc3..643d73446c3 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js @@ -143,8 +143,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -165,7 +165,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -189,7 +189,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -252,7 +252,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -270,11 +270,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -292,7 +292,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -318,7 +318,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -333,6 +333,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -351,7 +354,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -368,7 +371,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -380,7 +382,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -401,7 +403,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -443,7 +445,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -466,9 +468,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -480,7 +480,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js index f70fee5d459..8c730f537d2 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js @@ -49,8 +49,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/solution/app/filewitherror.ts (used version) -/user/username/projects/solution/app/filewithouterror.ts (used version) +/user/username/projects/solution/app/filewitherror.ts (computed .d.ts during emit) +/user/username/projects/solution/app/filewithouterror.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: @@ -106,7 +106,7 @@ export declare class myClass { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","-11785903855-export class myClass { }"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -124,11 +124,11 @@ export declare class myClass { }, "./filewitherror.ts": { "version": "-8106435186-export var myClassWithError = class {\n tags() { }\n \n };", - "signature": "-8106435186-export var myClassWithError = class {\n tags() { }\n \n };" + "signature": "6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n" }, "./filewithouterror.ts": { "version": "-11785903855-export class myClass { }", - "signature": "-11785903855-export class myClass { }" + "signature": "-7432826827-export declare class myClass {\n}\n" } }, "options": { @@ -143,7 +143,7 @@ export declare class myClass { ] }, "version": "FakeTSVersion", - "size": 782 + "size": 984 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js index b12349bed94..5995d27a3dd 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js @@ -49,8 +49,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/solution/app/filewitherror.ts (used version) -/user/username/projects/solution/app/filewithouterror.ts (used version) +/user/username/projects/solution/app/filewitherror.ts (computed .d.ts during emit) +/user/username/projects/solution/app/filewithouterror.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: @@ -106,7 +106,7 @@ export declare class myClass { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","-11785903855-export class myClass { }"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -124,11 +124,11 @@ export declare class myClass { }, "./filewitherror.ts": { "version": "-8106435186-export var myClassWithError = class {\n tags() { }\n \n };", - "signature": "-8106435186-export var myClassWithError = class {\n tags() { }\n \n };" + "signature": "6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n" }, "./filewithouterror.ts": { "version": "-11785903855-export class myClass { }", - "signature": "-11785903855-export class myClass { }" + "signature": "-7432826827-export declare class myClass {\n}\n" } }, "options": { @@ -143,7 +143,7 @@ export declare class myClass { ] }, "version": "FakeTSVersion", - "size": 782 + "size": 984 } @@ -253,44 +253,5 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/solution/app/fileWithError.d.ts] file written with same contents //// [/user/username/projects/solution/app/fileWithoutError.js] file changed its modified time //// [/user/username/projects/solution/app/fileWithoutError.d.ts] file changed its modified time -//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},"-11785903855-export class myClass { }"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} - -//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../../a/lib/lib.d.ts", - "./filewitherror.ts", - "./filewithouterror.ts" - ], - "fileInfos": { - "../../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./filewitherror.ts": { - "version": "-8106435186-export var myClassWithError = class {\n tags() { }\n \n };", - "signature": "6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n" - }, - "./filewithouterror.ts": { - "version": "-11785903855-export class myClass { }", - "signature": "-11785903855-export class myClass { }" - } - }, - "options": { - "composite": true - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../../../a/lib/lib.d.ts", - "./filewitherror.ts", - "./filewithouterror.ts" - ] - }, - "version": "FakeTSVersion", - "size": 910 -} - +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] file written with same contents +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js index fc29f8536a4..4015ea58164 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js @@ -55,7 +55,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/solution/app/filewitherror.ts (used version) -/user/username/projects/solution/app/filewithouterror.ts (used version) +/user/username/projects/solution/app/filewithouterror.ts (computed .d.ts) WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js index 420053ce275..c019a99ee91 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js @@ -55,7 +55,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/solution/app/filewitherror.ts (used version) -/user/username/projects/solution/app/filewithouterror.ts (used version) +/user/username/projects/solution/app/filewithouterror.ts (computed .d.ts) WatchedFiles:: /user/username/projects/solution/app/tsconfig.json: @@ -160,7 +160,7 @@ export declare class myClass { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},"-11785903855-export class myClass { }"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -182,7 +182,7 @@ export declare class myClass { }, "./filewithouterror.ts": { "version": "-11785903855-export class myClass { }", - "signature": "-11785903855-export class myClass { }" + "signature": "-7432826827-export declare class myClass {\n}\n" } }, "options": { @@ -197,6 +197,6 @@ export declare class myClass { ] }, "version": "FakeTSVersion", - "size": 910 + "size": 984 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js index 90e048179dd..a8153212b39 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -172,7 +172,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -235,7 +235,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,11 +253,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -275,7 +275,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -301,7 +301,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,6 +316,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -334,7 +337,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -351,7 +354,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -363,7 +365,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -384,7 +386,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -426,7 +428,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -449,9 +451,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -463,7 +463,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } @@ -692,7 +692,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"./index.ts","start":186,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"./index.ts","start":186,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -710,7 +710,7 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;", @@ -750,6 +750,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1450 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js index 8dafd22d581..eb6b300a47b 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js @@ -125,8 +125,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"preserveWatchOutput":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -147,7 +147,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"preserveWatchOutput":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -171,7 +171,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -234,7 +234,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -252,11 +252,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -274,7 +274,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -300,7 +300,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -315,6 +315,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -333,7 +336,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -350,7 +353,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -362,7 +364,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -383,7 +385,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -425,7 +427,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -448,9 +450,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -462,7 +462,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } @@ -689,7 +689,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"./index.ts","start":186,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"./index.ts","start":186,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -707,7 +707,7 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-17094159457-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nlet x: string = 10;", @@ -747,6 +747,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1370 + "size": 1450 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js index d2637c2a767..7a9b4eeb19a 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js @@ -57,8 +57,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -105,7 +105,7 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -123,11 +123,11 @@ export declare function multiply(a: number, b: number): number; }, "../anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "../index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -143,7 +143,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 915 + "size": 1205 } @@ -229,7 +229,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/outDir/index.js] file changed its modified time //// [/user/username/projects/sample1/core/outDir/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../file3.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"},"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../file3.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"outDir":"./"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -248,7 +248,7 @@ exitCode:: ExitStatus.undefined }, "../anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "../file3.ts": { "version": "-13729955264-export const y = 10;", @@ -256,7 +256,7 @@ exitCode:: ExitStatus.undefined }, "../index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -273,7 +273,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1036 + "size": 1326 } //// [/user/username/projects/sample1/core/outDir/file3.js] diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js index 2d0701aa9eb..c81779a1252 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js @@ -64,8 +64,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -118,7 +118,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -136,11 +136,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -158,7 +158,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } @@ -246,7 +246,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/index.d.ts.map] file changed its modified time //// [/user/username/projects/sample1/core/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./file3.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"},"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./file3.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -265,7 +265,7 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./file3.ts": { "version": "-13729955264-export const y = 10;", @@ -273,7 +273,7 @@ exitCode:: ExitStatus.undefined }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -292,7 +292,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1084 + "size": 1374 } //// [/user/username/projects/sample1/core/file3.js] diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js b/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js index 2400cdfd5cd..caef5fcf161 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -207,7 +207,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -225,11 +225,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -247,7 +247,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -273,7 +273,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -288,6 +288,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -306,7 +309,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -323,7 +326,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -335,6 +337,6 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js b/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js index c4f0f7c44da..a9713a13209 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js @@ -94,8 +94,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -154,7 +154,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -172,11 +172,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -194,7 +194,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } @@ -242,7 +242,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -293,7 +293,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -308,6 +308,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -326,7 +329,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -343,7 +346,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -355,7 +357,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } @@ -390,7 +392,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -436,7 +438,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -478,7 +480,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -501,9 +503,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -515,6 +515,6 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js index 3f01c3bbc16..bc3d7d649a1 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js @@ -59,7 +59,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/library/library.ts (used version) +/user/username/projects/sample1/library/library.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/App/app.ts"] Program options: {"watch":true,"configFilePath":"/user/username/projects/sample1/App/tsconfig.json"} @@ -120,7 +120,7 @@ export {}; //// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./library.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./library.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}","signature":"-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -137,7 +137,7 @@ export {}; }, "./library.ts": { "version": "5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", - "signature": "5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}" + "signature": "-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n" } }, "options": { @@ -151,7 +151,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 795 + "size": 953 } //// [/user/username/projects/sample1/App/app.js] diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js index 30fe91bdc9b..47c6be2b396 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -100,8 +100,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -122,7 +122,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -146,7 +146,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -203,7 +203,7 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -221,11 +221,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -241,7 +241,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 915 + "size": 1205 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -267,7 +267,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -282,6 +282,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -300,7 +303,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -317,7 +320,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -329,7 +331,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1215 + "size": 1394 } //// [/user/username/projects/sample1/tests/index.js] @@ -350,7 +352,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -392,7 +394,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -415,9 +417,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -429,7 +429,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1417 + "size": 1539 } @@ -494,7 +494,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/index.js] file changed its modified time //// [/user/username/projects/sample1/core/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-16320201030-export const newFileConst = 30;","signature":"-22941483372-export declare const newFileConst = 30;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-16320201030-export const newFileConst = 30;","signature":"-22941483372-export declare const newFileConst = 30;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -513,11 +513,11 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./newfile.ts": { "version": "-16320201030-export const newFileConst = 30;", @@ -538,7 +538,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1060 + "size": 1350 } //// [/user/username/projects/sample1/core/newfile.js] @@ -722,7 +722,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/index.js] file changed its modified time //// [/user/username/projects/sample1/core/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9703836816-export const newFileConst = 30;\nexport class someClass2 { }","signature":"-12384508924-export declare const newFileConst = 30;\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9703836816-export const newFileConst = 30;\nexport class someClass2 { }","signature":"-12384508924-export declare const newFileConst = 30;\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -741,11 +741,11 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./newfile.ts": { "version": "-9703836816-export const newFileConst = 30;\nexport class someClass2 { }", @@ -766,7 +766,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1126 + "size": 1416 } //// [/user/username/projects/sample1/core/newfile.js] diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js index 572630b21e7..c75488ba556 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/change-builds-changes-and-reports-found-errors-message.js @@ -100,8 +100,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -122,7 +122,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -146,7 +146,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -203,7 +203,7 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -221,11 +221,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -241,7 +241,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 915 + "size": 1205 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -267,7 +267,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -282,6 +282,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -300,7 +303,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -317,7 +320,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -329,7 +331,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1215 + "size": 1394 } //// [/user/username/projects/sample1/tests/index.js] @@ -350,7 +352,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -392,7 +394,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -415,9 +417,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -429,7 +429,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1417 + "size": 1539 } @@ -518,7 +518,7 @@ export declare class someClass { //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-2489663677-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-2489663677-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -536,7 +536,7 @@ export declare class someClass { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -556,7 +556,7 @@ export declare class someClass { ] }, "version": "FakeTSVersion", - "size": 1190 + "size": 1270 } @@ -894,7 +894,7 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -912,7 +912,7 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", @@ -932,7 +932,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 1125 + "size": 1205 } @@ -1288,7 +1288,7 @@ export declare class someClass2 { //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }","signature":"-1938481101-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }","signature":"-1938481101-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1306,7 +1306,7 @@ export declare class someClass2 { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }", @@ -1326,7 +1326,7 @@ export declare class someClass2 { ] }, "version": "FakeTSVersion", - "size": 1256 + "size": 1336 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js index faf36160c57..3d6e66045df 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-circular-project-reference/non-local-change-does-not-start-build-of-referencing-projects.js @@ -100,8 +100,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -122,7 +122,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -146,7 +146,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -203,7 +203,7 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -221,11 +221,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -241,7 +241,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 915 + "size": 1205 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -267,7 +267,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -282,6 +282,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -300,7 +303,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -317,7 +320,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -329,7 +331,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1215 + "size": 1394 } //// [/user/username/projects/sample1/tests/index.js] @@ -350,7 +352,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -392,7 +394,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -415,9 +417,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -429,7 +429,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1417 + "size": 1539 } @@ -506,7 +506,7 @@ function foo() { } //// [/user/username/projects/sample1/core/index.d.ts] file written with same contents //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -524,7 +524,7 @@ function foo() { } }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }", @@ -544,7 +544,7 @@ function foo() { } ] }, "version": "FakeTSVersion", - "size": 1145 + "size": 1225 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js index 98a5dd023b7..6aafabd4097 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -172,7 +172,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -235,7 +235,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,11 +253,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -275,7 +275,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -301,7 +301,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,6 +316,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -334,7 +337,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -351,7 +354,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -363,7 +365,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -384,7 +386,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -426,7 +428,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -449,9 +451,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -463,7 +463,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } @@ -530,7 +530,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/index.d.ts.map] file changed its modified time //// [/user/username/projects/sample1/core/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-16320201030-export const newFileConst = 30;","signature":"-22941483372-export declare const newFileConst = 30;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-16320201030-export const newFileConst = 30;","signature":"-22941483372-export declare const newFileConst = 30;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -549,11 +549,11 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./newfile.ts": { "version": "-16320201030-export const newFileConst = 30;", @@ -576,7 +576,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1109 + "size": 1399 } //// [/user/username/projects/sample1/core/newfile.js] @@ -765,7 +765,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/index.d.ts.map] file changed its modified time //// [/user/username/projects/sample1/core/index.d.ts] file changed its modified time //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9703836816-export const newFileConst = 30;\nexport class someClass2 { }","signature":"-12384508924-export declare const newFileConst = 30;\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./newfile.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9703836816-export const newFileConst = 30;\nexport class someClass2 { }","signature":"-12384508924-export declare const newFileConst = 30;\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -784,11 +784,11 @@ exitCode:: ExitStatus.undefined }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./newfile.ts": { "version": "-9703836816-export const newFileConst = 30;\nexport class someClass2 { }", @@ -811,7 +811,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1175 + "size": 1465 } //// [/user/username/projects/sample1/core/newfile.js] diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js index fc63f6a9185..d8fc2592bbe 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -172,7 +172,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -235,7 +235,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,11 +253,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -275,7 +275,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -301,7 +301,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,6 +316,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -334,7 +337,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -351,7 +354,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -363,7 +365,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -384,7 +386,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -426,7 +428,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -449,9 +451,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -463,7 +463,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } @@ -556,7 +556,7 @@ export declare class someClass { //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-2489663677-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-2489663677-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -574,7 +574,7 @@ export declare class someClass { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", @@ -596,7 +596,7 @@ export declare class someClass { ] }, "version": "FakeTSVersion", - "size": 1239 + "size": 1319 } @@ -938,7 +938,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -956,7 +956,7 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", @@ -978,7 +978,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 1174 + "size": 1254 } @@ -1338,7 +1338,7 @@ export declare class someClass2 { //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }","signature":"-1938481101-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }","signature":"-1938481101-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1356,7 +1356,7 @@ export declare class someClass2 { }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-8266060440-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nexport class someClass2 { }", @@ -1378,7 +1378,7 @@ export declare class someClass2 { ] }, "version": "FakeTSVersion", - "size": 1305 + "size": 1385 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js index 8b21e84add5..bfe1294d290 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js @@ -126,8 +126,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/sample1/core/anothermodule.ts (used version) -/user/username/projects/sample1/core/index.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/logic/index.ts"] Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/logic/tsconfig.json"} @@ -148,7 +148,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) -/user/username/projects/sample1/logic/index.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) Program root files: ["/user/username/projects/sample1/tests/index.ts"] Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"watch":true,"configFilePath":"/user/username/projects/sample1/tests/tsconfig.json"} @@ -172,7 +172,7 @@ Shape signatures in builder refreshed for:: /user/username/projects/sample1/core/index.d.ts (used version) /user/username/projects/sample1/core/anothermodule.d.ts (used version) /user/username/projects/sample1/logic/index.d.ts (used version) -/user/username/projects/sample1/tests/index.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/sample1/core/tsconfig.json: @@ -235,7 +235,7 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n"],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,11 +253,11 @@ export declare function multiply(a: number, b: number): number; }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n" + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" } }, "options": { @@ -275,7 +275,7 @@ export declare function multiply(a: number, b: number): number; ] }, "version": "FakeTSVersion", - "size": 964 + "size": 1254 } //// [/user/username/projects/sample1/logic/index.js.map] @@ -301,7 +301,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,6 +316,9 @@ export declare const m: typeof mod; [ "../core/index.d.ts", "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" ] ], "fileInfos": { @@ -334,7 +337,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -351,7 +354,6 @@ export declare const m: typeof mod; }, "exportedModulesMap": { "./index.ts": [ - "../core/index.d.ts", "../core/anothermodule.d.ts" ] }, @@ -363,7 +365,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1293 + "size": 1472 } //// [/user/username/projects/sample1/tests/index.js] @@ -384,7 +386,7 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -426,7 +428,7 @@ export declare const m: typeof mod; }, "./index.ts": { "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n" + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "options": { @@ -449,9 +451,7 @@ export declare const m: typeof mod; "../core/anothermodule.d.ts" ], "./index.ts": [ - "../core/index.d.ts", - "../core/anothermodule.d.ts", - "../logic/index.d.ts" + "../core/anothermodule.d.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -463,7 +463,7 @@ export declare const m: typeof mod; ] }, "version": "FakeTSVersion", - "size": 1495 + "size": 1617 } @@ -542,7 +542,7 @@ function foo() { } //// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents //// [/user/username/projects/sample1/core/index.d.ts] file written with same contents //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n",{"version":"-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -560,7 +560,7 @@ function foo() { } }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "-2676574883-export const World = \"hello\";\r\n" + "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { "version": "-21447768693-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nfunction foo() { }", @@ -582,7 +582,7 @@ function foo() { } ] }, "version": "FakeTSVersion", - "size": 1194 + "size": 1274 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js b/tests/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js index b389fa1e55e..02d8ce95925 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js @@ -74,8 +74,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/a/b/commonfile1.ts (used version) -/a/b/commonfile2.ts (used version) +/a/b/commonfile1.ts (computed .d.ts during emit) +/a/b/commonfile2.ts (computed .d.ts during emit) Program root files: ["/a/b/other.ts"] Program options: {"strict":true,"composite":true,"watch":true,"configFilePath":"/a/b/project2.tsconfig.json"} @@ -90,7 +90,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/a/b/other.ts (used version) +/a/b/other.ts (computed .d.ts during emit) WatchedFiles:: /a/b/project1.tsconfig.json: @@ -135,7 +135,7 @@ declare let y: number; //// [/a/b/project1.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./commonfile1.ts","./commonfile2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2167136208-let x = 1","affectsGlobalScope":true},{"version":"2168322129-let y = 1","affectsGlobalScope":true}],"options":{"composite":true,"strict":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,3,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./commonfile1.ts","./commonfile2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2167136208-let x = 1","signature":"2842409786-declare let x: number;\n","affectsGlobalScope":true},{"version":"2168322129-let y = 1","signature":"784887931-declare let y: number;\n","affectsGlobalScope":true}],"options":{"composite":true,"strict":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,3,1]},"version":"FakeTSVersion"} //// [/a/b/project1.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -153,12 +153,12 @@ declare let y: number; }, "./commonfile1.ts": { "version": "2167136208-let x = 1", - "signature": "2167136208-let x = 1", + "signature": "2842409786-declare let x: number;\n", "affectsGlobalScope": true }, "./commonfile2.ts": { "version": "2168322129-let y = 1", - "signature": "2168322129-let y = 1", + "signature": "784887931-declare let y: number;\n", "affectsGlobalScope": true } }, @@ -175,7 +175,7 @@ declare let y: number; ] }, "version": "FakeTSVersion", - "size": 767 + "size": 866 } //// [/a/b/other.js] @@ -188,7 +188,7 @@ declare let z: number; //// [/a/b/project2.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2874288940-let z = 0;","affectsGlobalScope":true}],"options":{"composite":true,"strict":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2874288940-let z = 0;","signature":"-1272633924-declare let z: number;\n","affectsGlobalScope":true}],"options":{"composite":true,"strict":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,1]},"version":"FakeTSVersion"} //// [/a/b/project2.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -205,7 +205,7 @@ declare let z: number; }, "./other.ts": { "version": "2874288940-let z = 0;", - "signature": "2874288940-let z = 0;", + "signature": "-1272633924-declare let z: number;\n", "affectsGlobalScope": true } }, @@ -221,7 +221,7 @@ declare let z: number; ] }, "version": "FakeTSVersion", - "size": 680 + "size": 731 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js index f6635b289db..abb8acaffde 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js @@ -70,8 +70,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/a/b/commonfile1.ts (used version) -/a/b/commonfile2.ts (used version) +/a/b/commonfile1.ts (computed .d.ts during emit) +/a/b/commonfile2.ts (computed .d.ts during emit) Program root files: ["/a/b/other.ts"] Program options: {"composite":true,"watch":true,"configFilePath":"/a/b/project2.tsconfig.json"} @@ -86,7 +86,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/a/b/other.ts (used version) +/a/b/other.ts (computed .d.ts during emit) WatchedFiles:: /a/b/project1.tsconfig.json: @@ -127,7 +127,7 @@ declare let y: number; //// [/a/b/project1.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./commonfile1.ts","./commonfile2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2167136208-let x = 1","affectsGlobalScope":true},{"version":"2168322129-let y = 1","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,3,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./commonfile1.ts","./commonfile2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2167136208-let x = 1","signature":"2842409786-declare let x: number;\n","affectsGlobalScope":true},{"version":"2168322129-let y = 1","signature":"784887931-declare let y: number;\n","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,3,1]},"version":"FakeTSVersion"} //// [/a/b/project1.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -145,12 +145,12 @@ declare let y: number; }, "./commonfile1.ts": { "version": "2167136208-let x = 1", - "signature": "2167136208-let x = 1", + "signature": "2842409786-declare let x: number;\n", "affectsGlobalScope": true }, "./commonfile2.ts": { "version": "2168322129-let y = 1", - "signature": "2168322129-let y = 1", + "signature": "784887931-declare let y: number;\n", "affectsGlobalScope": true } }, @@ -166,7 +166,7 @@ declare let y: number; ] }, "version": "FakeTSVersion", - "size": 753 + "size": 852 } //// [/a/b/other.js] @@ -178,7 +178,7 @@ declare let z: number; //// [/a/b/project2.tsconfig.tsbuildinfo] -{"program":{"fileNames":["../lib/lib.d.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2874288940-let z = 0;","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../lib/lib.d.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2874288940-let z = 0;","signature":"-1272633924-declare let z: number;\n","affectsGlobalScope":true}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[2,1]},"version":"FakeTSVersion"} //// [/a/b/project2.tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -195,7 +195,7 @@ declare let z: number; }, "./other.ts": { "version": "2874288940-let z = 0;", - "signature": "2874288940-let z = 0;", + "signature": "-1272633924-declare let z: number;\n", "affectsGlobalScope": true } }, @@ -210,7 +210,7 @@ declare let z: number; ] }, "version": "FakeTSVersion", - "size": 666 + "size": 717 } diff --git a/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js b/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js index 09cf4605ade..0128d3c6f49 100644 --- a/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js +++ b/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js @@ -101,7 +101,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/reexport/src/pure/session.ts (used version) +/user/username/projects/reexport/src/pure/session.ts (computed .d.ts during emit) /user/username/projects/reexport/src/pure/index.ts (used version) Program root files: ["/user/username/projects/reexport/src/main/index.ts"] @@ -187,7 +187,7 @@ export * from "./session"; //// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../src/pure/session.ts","../../src/pure/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5375279855-export interface Session {\n foo: number;\n // bar: number;\n}\n","-5356193041-export * from \"./session\";\n"],"options":{"composite":true,"outDir":"..","rootDir":"../../src"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../src/pure/session.ts","../../src/pure/index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"5375279855-export interface Session {\n foo: number;\n // bar: number;\n}\n","signature":"-1218067212-export interface Session {\n foo: number;\n}\n"},"-5356193041-export * from \"./session\";\n"],"options":{"composite":true,"outDir":"..","rootDir":"../../src"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -210,7 +210,7 @@ export * from "./session"; }, "../../src/pure/session.ts": { "version": "5375279855-export interface Session {\n foo: number;\n // bar: number;\n}\n", - "signature": "5375279855-export interface Session {\n foo: number;\n // bar: number;\n}\n" + "signature": "-1218067212-export interface Session {\n foo: number;\n}\n" }, "../../src/pure/index.ts": { "version": "-5356193041-export * from \"./session\";\n", @@ -239,7 +239,7 @@ export * from "./session"; ] }, "version": "FakeTSVersion", - "size": 935 + "size": 1023 } //// [/user/username/projects/reexport/out/main/index.js] diff --git a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js new file mode 100644 index 00000000000..4a35b33af3c --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js @@ -0,0 +1,287 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/class1.ts] +const a: MagicNumber = 1; +console.log(a); + +//// [/src/project/constants.ts] +export default 1; + +//// [/src/project/reexport.ts] +export { default as ConstantNumber } from "./constants" + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true}} + +//// [/src/project/types.d.ts] +type MagicNumber = typeof import('./reexport').ConstantNumber + + + +Output:: +/lib/tsc -p src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/class1.d.ts] +declare const a = 1; + + +//// [/src/project/class1.js] +var a = 1; +console.log(a); + + +//// [/src/project/constants.d.ts] +declare const _default: 1; +export default _default; + + +//// [/src/project/constants.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 1; + + +//// [/src/project/reexport.d.ts] +export { default as ConstantNumber } from "./constants"; + + +//// [/src/project/reexport.js] +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports.ConstantNumber = void 0; +var constants_1 = require("./constants"); +__createBinding(exports, constants_1, "default", "ConstantNumber"); + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-4973073251-declare const a = 1;\r\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-5298367302-declare const _default: 1;\r\nexport default _default;\r\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1329721329-export { default as ConstantNumber } from \"./constants\";\r\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ], + "fileNamesList": [ + [ + "./constants.ts" + ], + [ + "./reexport.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./class1.ts": { + "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", + "signature": "-4973073251-declare const a = 1;\r\n", + "affectsGlobalScope": true + }, + "./constants.ts": { + "version": "-2659799048-export default 1;", + "signature": "-5298367302-declare const _default: 1;\r\nexport default _default;\r\n" + }, + "./reexport.ts": { + "version": "-1476032387-export { default as ConstantNumber } from \"./constants\"", + "signature": "-1329721329-export { default as ConstantNumber } from \"./constants\";\r\n" + }, + "./types.d.ts": { + "version": "2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber", + "signature": "2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./reexport.ts": [ + "./constants.ts" + ], + "./types.d.ts": [ + "./reexport.ts" + ] + }, + "exportedModulesMap": { + "./reexport.ts": [ + "./constants.ts" + ], + "./types.d.ts": [ + "./reexport.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1348 +} + + + +Change:: Modify imports used in global file +Input:: +//// [/src/project/constants.ts] +export default 2; + + + +Output:: +/lib/tsc -p src/project +src/project/class1.ts:1:7 - error TS2322: Type '1' is not assignable to type '2'. + +1 const a: MagicNumber = 1; +   ~ + + +Found 1 error in src/project/class1.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/class1.d.ts] +declare const a = 2; + + +//// [/src/project/constants.d.ts] +declare const _default: 2; +export default _default; + + +//// [/src/project/constants.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 2; + + +//// [/src/project/reexport.d.ts] file written with same contents +//// [/src/project/reexport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-4973037314-declare const a = 2;\r\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"1573564507-declare const _default: 2;\r\nexport default _default;\r\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1329721329-export { default as ConstantNumber } from \"./constants\";\r\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ], + "fileNamesList": [ + [ + "./constants.ts" + ], + [ + "./reexport.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./class1.ts": { + "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", + "signature": "-4973037314-declare const a = 2;\r\n", + "affectsGlobalScope": true + }, + "./constants.ts": { + "version": "-2659799015-export default 2;", + "signature": "1573564507-declare const _default: 2;\r\nexport default _default;\r\n" + }, + "./reexport.ts": { + "version": "-1476032387-export { default as ConstantNumber } from \"./constants\"", + "signature": "-1329721329-export { default as ConstantNumber } from \"./constants\";\r\n" + }, + "./types.d.ts": { + "version": "2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber", + "signature": "2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./reexport.ts": [ + "./constants.ts" + ], + "./types.d.ts": [ + "./reexport.ts" + ] + }, + "exportedModulesMap": { + "./reexport.ts": [ + "./constants.ts" + ], + "./types.d.ts": [ + "./reexport.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./class1.ts", + [ + { + "file": "./class1.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '1' is not assignable to type '2'." + } + ] + ], + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1476 +} + diff --git a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js new file mode 100644 index 00000000000..7a1310b88a4 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js @@ -0,0 +1,229 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/class1.ts] +const a: MagicNumber = 1; +console.log(a); + +//// [/src/project/constants.ts] +export default 1; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true}} + +//// [/src/project/types.d.ts] +type MagicNumber = typeof import('./constants').default + + + +Output:: +/lib/tsc -p src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/class1.d.ts] +declare const a = 1; + + +//// [/src/project/class1.js] +var a = 1; +console.log(a); + + +//// [/src/project/constants.d.ts] +declare const _default: 1; +export default _default; + + +//// [/src/project/constants.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 1; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-4973073251-declare const a = 1;\r\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-5298367302-declare const _default: 1;\r\nexport default _default;\r\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./types.d.ts" + ], + "fileNamesList": [ + [ + "./constants.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./class1.ts": { + "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", + "signature": "-4973073251-declare const a = 1;\r\n", + "affectsGlobalScope": true + }, + "./constants.ts": { + "version": "-2659799048-export default 1;", + "signature": "-5298367302-declare const _default: 1;\r\nexport default _default;\r\n" + }, + "./types.d.ts": { + "version": "-2080821236-type MagicNumber = typeof import('./constants').default", + "signature": "-2080821236-type MagicNumber = typeof import('./constants').default", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./types.d.ts": [ + "./constants.ts" + ] + }, + "exportedModulesMap": { + "./types.d.ts": [ + "./constants.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./types.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1136 +} + + + +Change:: Modify imports used in global file +Input:: +//// [/src/project/constants.ts] +export default 2; + + + +Output:: +/lib/tsc -p src/project +src/project/class1.ts:1:7 - error TS2322: Type '1' is not assignable to type '2'. + +1 const a: MagicNumber = 1; +   ~ + + +Found 1 error in src/project/class1.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/class1.d.ts] +declare const a = 2; + + +//// [/src/project/constants.d.ts] +declare const _default: 2; +export default _default; + + +//// [/src/project/constants.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 2; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-4973037314-declare const a = 2;\r\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"1573564507-declare const _default: 2;\r\nexport default _default;\r\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./class1.ts", + "./constants.ts", + "./types.d.ts" + ], + "fileNamesList": [ + [ + "./constants.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./class1.ts": { + "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", + "signature": "-4973037314-declare const a = 2;\r\n", + "affectsGlobalScope": true + }, + "./constants.ts": { + "version": "-2659799015-export default 2;", + "signature": "1573564507-declare const _default: 2;\r\nexport default _default;\r\n" + }, + "./types.d.ts": { + "version": "-2080821236-type MagicNumber = typeof import('./constants').default", + "signature": "-2080821236-type MagicNumber = typeof import('./constants').default", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./types.d.ts": [ + "./constants.ts" + ] + }, + "exportedModulesMap": { + "./types.d.ts": [ + "./constants.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./class1.ts", + [ + { + "file": "./class1.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '1' is not assignable to type '2'." + } + ] + ], + "./constants.ts", + "./types.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1264 +} + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js new file mode 100644 index 00000000000..570eccd361d --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js @@ -0,0 +1,40 @@ +2:: Introduce error but still noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +13:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js index 6e44cb64d29..3409cacd28b 100644 --- a/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js @@ -148,7 +148,7 @@ function someFunc(arguments) { //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -178,27 +178,27 @@ function someFunc(arguments) { }, "./src/class.ts": { "version": "545032748-export class classC {\n prop = 1;\n}", - "signature": "545032748-export class classC {\n prop = 1;\n}" + "signature": "-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n" }, "./src/indirectclass.ts": { "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + "signature": "-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n" }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -217,14 +217,8 @@ function someFunc(arguments) { ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -251,7 +245,7 @@ function someFunc(arguments) { ] }, "version": "FakeTSVersion", - "size": 1651 + "size": 2178 } @@ -319,7 +313,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,1],[3,1],[5,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -357,19 +351,19 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-4882119183-export {};\r\n" + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-4882119183-export {};\r\n" + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -388,8 +382,14 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "exportedModulesMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], "./src/indirectclass.ts": [ "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -465,7 +465,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ], [ "./src/directuse.ts", - "Full" + "DtsOnly" ], [ "./src/indirectclass.ts", @@ -473,12 +473,12 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ], [ "./src/indirectuse.ts", - "Full" + "DtsOnly" ] ] }, "version": "FakeTSVersion", - "size": 2657 + "size": 2754 } @@ -508,13 +508,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated //// [/src/project/src/class.d.ts] file written with same contents //// [/src/project/src/class.js] file written with same contents //// [/src/project/src/directUse.d.ts] file written with same contents -//// [/src/project/src/directUse.js] file written with same contents //// [/src/project/src/indirectClass.d.ts] file written with same contents //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents -//// [/src/project/src/indirectUse.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -552,19 +550,19 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -583,14 +581,8 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -617,7 +609,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "version": "FakeTSVersion", - "size": 1893 + "size": 2178 } @@ -752,7 +744,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -790,19 +782,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -821,14 +813,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -899,7 +885,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 2510 + "size": 2795 } @@ -1079,7 +1065,7 @@ exitCode:: ExitStatus.Success //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1125,11 +1111,11 @@ exitCode:: ExitStatus.Success }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -1200,7 +1186,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1946 + "size": 2137 } @@ -1246,7 +1232,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1284,19 +1270,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -1315,14 +1301,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -1349,7 +1329,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 1893 + "size": 2178 } diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration-discrepancies.js new file mode 100644 index 00000000000..570eccd361d --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration-discrepancies.js @@ -0,0 +1,40 @@ +2:: Introduce error but still noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +13:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js index 2e2f7e9a2dc..cf58b47ce13 100644 --- a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js @@ -148,7 +148,7 @@ function someFunc(arguments) { //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -178,27 +178,27 @@ function someFunc(arguments) { }, "./src/class.ts": { "version": "545032748-export class classC {\n prop = 1;\n}", - "signature": "545032748-export class classC {\n prop = 1;\n}" + "signature": "-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n" }, "./src/indirectclass.ts": { "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + "signature": "-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n" }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -217,14 +217,8 @@ function someFunc(arguments) { ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -251,7 +245,7 @@ function someFunc(arguments) { ] }, "version": "FakeTSVersion", - "size": 1653 + "size": 2180 } @@ -319,7 +313,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,1],[3,1],[5,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -357,19 +351,19 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-4882119183-export {};\r\n" + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-4882119183-export {};\r\n" + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -388,8 +382,14 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "exportedModulesMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], "./src/indirectclass.ts": [ "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -465,7 +465,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ], [ "./src/directuse.ts", - "Full" + "DtsOnly" ], [ "./src/indirectclass.ts", @@ -473,12 +473,12 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ], [ "./src/indirectuse.ts", - "Full" + "DtsOnly" ] ] }, "version": "FakeTSVersion", - "size": 2659 + "size": 2756 } @@ -508,13 +508,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated //// [/src/project/src/class.d.ts] file written with same contents //// [/src/project/src/class.js] file written with same contents //// [/src/project/src/directUse.d.ts] file written with same contents -//// [/src/project/src/directUse.js] file written with same contents //// [/src/project/src/indirectClass.d.ts] file written with same contents //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents -//// [/src/project/src/indirectUse.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -552,19 +550,19 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -583,14 +581,8 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -617,7 +609,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] }, "version": "FakeTSVersion", - "size": 1895 + "size": 2180 } @@ -752,7 +744,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -790,19 +782,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -821,14 +813,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -899,7 +885,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 2512 + "size": 2797 } @@ -1079,7 +1065,7 @@ exitCode:: ExitStatus.Success //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1125,11 +1111,11 @@ exitCode:: ExitStatus.Success }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -1200,7 +1186,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1948 + "size": 2139 } @@ -1246,7 +1232,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1284,19 +1270,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -1315,14 +1301,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -1349,7 +1329,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 1895 + "size": 2180 } diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-discrepancies.js new file mode 100644 index 00000000000..3bae3d8e6e8 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-discrepancies.js @@ -0,0 +1,340 @@ +0:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +1:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +3:: Fix error and emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +4:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +5:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +6:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +7:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +8:: Introduce error and emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +9:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +10:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +11:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +12:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +13:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +14:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +15:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +16:: No Change run with noEmit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +17:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js new file mode 100644 index 00000000000..68e9e067596 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js @@ -0,0 +1,20 @@ +2:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js index ff0eb3c71d8..328b68562b3 100644 --- a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js @@ -292,7 +292,7 @@ function someFunc(arguments) { //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -322,27 +322,27 @@ function someFunc(arguments) { }, "./src/class.ts": { "version": "545032748-export class classC {\n prop = 1;\n}", - "signature": "545032748-export class classC {\n prop = 1;\n}" + "signature": "-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n" }, "./src/indirectclass.ts": { "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + "signature": "-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n" }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -361,14 +361,8 @@ function someFunc(arguments) { ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -395,7 +389,7 @@ function someFunc(arguments) { ] }, "version": "FakeTSVersion", - "size": 1651 + "size": 2178 } @@ -466,13 +460,11 @@ exports.classC = classC; //// [/src/project/src/directUse.d.ts] file written with same contents -//// [/src/project/src/directUse.js] file written with same contents //// [/src/project/src/indirectClass.d.ts] file written with same contents //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents -//// [/src/project/src/indirectUse.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -518,11 +510,11 @@ exports.classC = classC; }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -613,7 +605,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 2604 + "size": 2795 } @@ -633,7 +625,7 @@ exitCode:: ExitStatus.Success //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -679,11 +671,11 @@ exitCode:: ExitStatus.Success }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -754,7 +746,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1946 + "size": 2137 } @@ -800,7 +792,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -838,19 +830,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -869,14 +861,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -903,6 +889,6 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 1893 + "size": 2178 } diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration-discrepancies.js new file mode 100644 index 00000000000..68e9e067596 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration-discrepancies.js @@ -0,0 +1,20 @@ +2:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js index 4fc2bd2751e..969989ad632 100644 --- a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js @@ -292,7 +292,7 @@ function someFunc(arguments) { //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -322,27 +322,27 @@ function someFunc(arguments) { }, "./src/class.ts": { "version": "545032748-export class classC {\n prop = 1;\n}", - "signature": "545032748-export class classC {\n prop = 1;\n}" + "signature": "-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n" }, "./src/indirectclass.ts": { "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + "signature": "-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n" }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -361,14 +361,8 @@ function someFunc(arguments) { ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -395,7 +389,7 @@ function someFunc(arguments) { ] }, "version": "FakeTSVersion", - "size": 1653 + "size": 2180 } @@ -466,13 +460,11 @@ exports.classC = classC; //// [/src/project/src/directUse.d.ts] file written with same contents -//// [/src/project/src/directUse.js] file written with same contents //// [/src/project/src/indirectClass.d.ts] file written with same contents //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents -//// [/src/project/src/indirectUse.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-3790894605-export declare class classC {\r\n prop1: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -518,11 +510,11 @@ exports.classC = classC; }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -613,7 +605,7 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 2606 + "size": 2797 } @@ -633,7 +625,7 @@ exitCode:: ExitStatus.Success //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[[2,1],[4,0],[3,1],[5,0]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -679,11 +671,11 @@ exitCode:: ExitStatus.Success }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -754,7 +746,7 @@ exitCode:: ExitStatus.Success ] }, "version": "FakeTSVersion", - "size": 1948 + "size": 2139 } @@ -800,7 +792,7 @@ exports.classC = classC; //// [/src/project/src/indirectClass.js] file written with same contents //// [/src/project/src/indirectUse.d.ts] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"545032748-export class classC {\n prop = 1;\n}","signature":"-6712382238-export declare class classC {\r\n prop: number;\r\n}\r\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"-9860349972-import { classC } from './class';\r\nexport declare class indirectClass {\r\n classC: classC;\r\n}\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-4882119183-export {};\r\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8117292349-export declare function writeLog(s: string): void;\r\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n","affectsGlobalScope":true}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -838,19 +830,19 @@ exports.classC = classC; }, "./src/directuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/indirectuse.ts": { "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + "signature": "-4882119183-export {};\r\n" }, "./src/nochangefile.ts": { "version": "6714567633-export function writeLog(s: string) {\n}", - "signature": "6714567633-export function writeLog(s: string) {\n}" + "signature": "8117292349-export declare function writeLog(s: string): void;\r\n" }, "./src/nochangefilewithemitspecificerror.ts": { "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", - "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-4920141752-declare function someFunc(arguments: boolean, ...rest: any[]): void;\r\n", "affectsGlobalScope": true } }, @@ -869,14 +861,8 @@ exports.classC = classC; ] }, "exportedModulesMap": { - "./src/directuse.ts": [ - "./src/indirectclass.ts" - ], "./src/indirectclass.ts": [ "./src/class.ts" - ], - "./src/indirectuse.ts": [ - "./src/indirectclass.ts" ] }, "semanticDiagnosticsPerFile": [ @@ -903,6 +889,6 @@ exports.classC = classC; ] }, "version": "FakeTSVersion", - "size": 1895 + "size": 2180 } diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-discrepancies.js new file mode 100644 index 00000000000..54786c7dcc1 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-discrepancies.js @@ -0,0 +1,60 @@ +0:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +2:: Fix error and no emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} +3:: No Change run with emit +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] +} +Clean: { + "./src/indirectclass.ts": [ + "./src/class.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js b/tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js index 0ae751e9f56..373c93ef276 100644 --- a/tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js +++ b/tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/lib/lib.esnext.d.ts] /// diff --git a/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js b/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js index 996ed74a210..45d6bab61cc 100644 --- a/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js +++ b/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js @@ -70,9 +70,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/project/src/filepresent.ts (used version) -/src/project/src/anotherfilewithsamereferenes.ts (used version) -/src/project/src/main.ts (used version) +/src/project/src/filepresent.ts (computed .d.ts during emit) +/src/project/src/anotherfilewithsamereferenes.ts (computed .d.ts during emit) +/src/project/src/main.ts (computed .d.ts during emit) //// [/src/project/src/anotherFileWithSameReferenes.d.ts] @@ -106,7 +106,7 @@ function main() { } //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","affectsGlobalScope":true},{"version":"-21256825585-/// \n/// \nfunction main() { }\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[2,5]],"referencedMap":[[3,1],[4,1]],"exportedModulesMap":[[3,1],[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-2893492081-declare function something(): number;\r\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"5108835150-/// \r\ndeclare function anotherFileWithSameReferenes(): void;\r\n","affectsGlobalScope":true},{"version":"-21256825585-/// \n/// \nfunction main() { }\n","signature":"-7575087679-/// \r\ndeclare function main(): void;\r\n","affectsGlobalScope":true}],"options":{"composite":true},"fileIdsList":[[2,5]],"referencedMap":[[3,1],[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -132,17 +132,17 @@ function main() { } }, "./src/filepresent.ts": { "version": "-12346563362-function something() { return 10; }", - "signature": "-12346563362-function something() { return 10; }", + "signature": "-2893492081-declare function something(): number;\r\n", "affectsGlobalScope": true }, "./src/anotherfilewithsamereferenes.ts": { "version": "-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n", - "signature": "-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n", + "signature": "5108835150-/// \r\ndeclare function anotherFileWithSameReferenes(): void;\r\n", "affectsGlobalScope": true }, "./src/main.ts": { "version": "-21256825585-/// \n/// \nfunction main() { }\n", - "signature": "-21256825585-/// \n/// \nfunction main() { }\n", + "signature": "-7575087679-/// \r\ndeclare function main(): void;\r\n", "affectsGlobalScope": true } }, @@ -159,16 +159,7 @@ function main() { } "./src/filenotfound.ts" ] }, - "exportedModulesMap": { - "./src/anotherfilewithsamereferenes.ts": [ - "./src/filepresent.ts", - "./src/filenotfound.ts" - ], - "./src/main.ts": [ - "./src/filepresent.ts", - "./src/filenotfound.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "./src/anotherfilewithsamereferenes.ts", @@ -177,7 +168,7 @@ function main() { } ] }, "version": "FakeTSVersion", - "size": 1266 + "size": 1562 } @@ -260,21 +251,12 @@ Program files:: /src/project/src/main.ts Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/project/src/filePresent.ts -/src/project/src/anotherFileWithSameReferenes.ts /src/project/src/main.ts Shape signatures in builder refreshed for:: /src/project/src/main.ts (computed .d.ts) -/src/project/src/filepresent.ts (computed .d.ts) -/src/project/src/anotherfilewithsamereferenes.ts (computed .d.ts) -//// [/src/project/src/anotherFileWithSameReferenes.d.ts] file written with same contents -//// [/src/project/src/anotherFileWithSameReferenes.js] file written with same contents -//// [/src/project/src/filePresent.d.ts] file written with same contents -//// [/src/project/src/filePresent.js] file written with same contents //// [/src/project/src/main.d.ts] file written with same contents //// [/src/project/src/main.js] /// diff --git a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js new file mode 100644 index 00000000000..aac6933253d --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js @@ -0,0 +1,112 @@ +0:: Add class3 to project1 and build it +Ts buildinfo will not be updated in incremental build so it will have semantic diagnostics cached from previous build +But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo +TsBuild info text without affectedFilesPendingEmit:: /src/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "version": "777969115-class class2 {}", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "module": 0 + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "version": "777969115-class class2 {}", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "module": 0 + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../project1/class1.d.ts", + "./class2.ts" + ] + }, + "version": "FakeTSVersion" +} +3:: Delete output for class3 +Ts buildinfo will be updated but will retain lib file errors from previous build and not others because they are emitted because of change which results in clearing their semantic diagnostics cache +But in clean build because of global diagnostics, semantic diagnostics are not queried so not cached in tsbuildinfo +TsBuild info text without affectedFilesPendingEmit:: /src/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "version": "777969115-class class2 {}", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "module": 0 + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "version": "777969115-class class2 {}", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "module": 0 + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js index e7ca71b47b9..0c1569a5bb7 100644 --- a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js +++ b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js @@ -18,7 +18,7 @@ declare const console: { log(msg: any): void; }; declare class class1 {} //// [/src/projects/project1/class1.ts] - +class class1 {} //// [/src/projects/project1/tsconfig.json] {"compilerOptions":{"module":"none","composite":true},"exclude":["temp"]} @@ -50,7 +50,7 @@ var class2 = /** @class */ (function () { //// [/src/projects/project2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2390931783-declare class class2 {\r\n}\r\n","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/src/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -73,7 +73,7 @@ var class2 = /** @class */ (function () { }, "./class2.ts": { "version": "777969115-class class2 {}", - "signature": "777969115-class class2 {}", + "signature": "-2390931783-declare class class2 {\r\n}\r\n", "affectsGlobalScope": true } }, @@ -88,7 +88,7 @@ var class2 = /** @class */ (function () { ] }, "version": "FakeTSVersion", - "size": 829 + "size": 887 } diff --git a/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors-discrepancies.js b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors-discrepancies.js new file mode 100644 index 00000000000..86eb6bdb396 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors-discrepancies.js @@ -0,0 +1,10 @@ +0:: no-change-run +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "../src/main.ts": [ + "../shared/types/db.ts" + ] +} +Clean: {} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors-discrepancies.js b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors-discrepancies.js new file mode 100644 index 00000000000..86eb6bdb396 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors-discrepancies.js @@ -0,0 +1,10 @@ +0:: no-change-run +Incremental build did not emit and has .ts as signature so exports has all imported modules/referenced files +Clean build always uses d.ts for signature for testing thus does not contain non exported modules/referenced files that arent needed +Incremental and clean size of maps do not match:: exportedModulesMap:: File:: /src/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt +Incremental: { + "../src/main.ts": [ + "../shared/types/db.ts" + ] +} +Clean: {} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/listFilesOnly/combined-with-watch.js b/tests/baselines/reference/tsc/listFilesOnly/combined-with-watch.js index 682f7082326..7447094744f 100644 --- a/tests/baselines/reference/tsc/listFilesOnly/combined-with-watch.js +++ b/tests/baselines/reference/tsc/listFilesOnly/combined-with-watch.js @@ -1,9 +1,21 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; //// [/src/test.ts] - +export const x = 1; diff --git a/tests/baselines/reference/tsc/projectReferences/when-project-references-composite-project-with-noEmit.js b/tests/baselines/reference/tsc/projectReferences/when-project-references-composite-project-with-noEmit.js index 567d039c7df..76a9491ccae 100644 --- a/tests/baselines/reference/tsc/projectReferences/when-project-references-composite-project-with-noEmit.js +++ b/tests/baselines/reference/tsc/projectReferences/when-project-references-composite-project-with-noEmit.js @@ -21,7 +21,7 @@ import { x } from "../utils"; {"references":[{"path":"../utils"}]} //// [/src/utils/index.ts] - +export const x = 10; //// [/src/utils/tsconfig.json] {"compilerOptions":{"composite":true,"noEmit":true}} diff --git a/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash-under---strict.js b/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash-under---strict.js index 5c280d6f8f1..21bbb86b255 100644 --- a/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash-under---strict.js +++ b/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash-under---strict.js @@ -29,7 +29,7 @@ declare global { } //// [/src/project/node_modules/react/jsx-runtime.js] - +export {} //// [/src/project/src/index.tsx] export const App = () =>

; diff --git a/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash.js b/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash.js index d1d33bd22eb..6e1a2c87c4a 100644 --- a/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash.js +++ b/tests/baselines/reference/tsc/react-jsx-emit-mode/with-no-backing-types-found-doesn't-crash.js @@ -29,7 +29,7 @@ declare global { } //// [/src/project/node_modules/react/jsx-runtime.js] - +export {} //// [/src/project/src/index.tsx] export const App = () =>
; diff --git a/tests/baselines/reference/tsc/redirect/when-redirecting-ts-file.js b/tests/baselines/reference/tsc/redirect/when-redirecting-ts-file.js new file mode 100644 index 00000000000..b50062956ca --- /dev/null +++ b/tests/baselines/reference/tsc/redirect/when-redirecting-ts-file.js @@ -0,0 +1,68 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/copy1/node_modules/target/import.ts] +import {} from "./"; + +//// [/src/project/copy1/node_modules/target/index.ts] +export const a = 1; + +//// [/src/project/copy1/node_modules/target/package.json] +{"name":"target","version":"1.0.0","main":"index.js"} + +//// [/src/project/copy2/node_modules/target/import.ts] +import {} from "./"; + +//// [/src/project/copy2/node_modules/target/index.ts] +export const a = 1; + +//// [/src/project/copy2/node_modules/target/package.json] +{"name":"target","version":"1.0.0","main":"index.js"} + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"outDir":"out"},"include":["copy1/node_modules/target/*","copy2/node_modules/target/*"]} + + + +Output:: +/lib/tsc -p src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/out/copy1/node_modules/target/import.js] +"use strict"; +exports.__esModule = true; + + +//// [/src/project/out/copy1/node_modules/target/index.js] +"use strict"; +exports.__esModule = true; +exports.a = void 0; +exports.a = 1; + + +//// [/src/project/out/copy2/node_modules/target/import.js] +"use strict"; +exports.__esModule = true; + + +//// [/src/project/out/copy2/node_modules/target/index.js] +"use strict"; +exports.__esModule = true; +exports.a = void 0; +exports.a = 1; + + diff --git a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js index 0787913fab7..5e7ba543d34 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; @@ -73,7 +85,7 @@ default: es3 --module, -m Specify what module code is generated. -one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node12, nodenext +one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, nodenext default: undefined --lib diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js index 1cedf139366..eb384f25ae3 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; @@ -73,7 +85,7 @@ default: es3 --module, -m Specify what module code is generated. -one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node12, nodenext +one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, nodenext default: undefined --lib diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index 1cedf139366..eb384f25ae3 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -1,6 +1,18 @@ Input:: //// [/lib/lib.d.ts] - +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; @@ -73,7 +85,7 @@ default: es3 --module, -m Specify what module code is generated. -one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node12, nodenext +one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, nodenext default: undefined --lib diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js index bead8dc0ba8..3bfc8798173 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js index 67484435710..1b5b6508729 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -154,12 +154,7 @@ Output:: >> Screen clear [12:00:42 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:01 AM] Found 1 error. Watching for file changes. +[12:00:55 AM] Found 0 errors. Watching for file changes. @@ -175,12 +170,10 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/c.ts /user/username/projects/myproject/b.ts -/user/username/projects/myproject/a.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (computed .d.ts) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -225,8 +218,6 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/a.js] file written with same contents -//// [/user/username/projects/myproject/a.d.ts] file written with same contents Change:: Rename property d2 to d of class C to revert back to original text @@ -240,14 +231,9 @@ export class C Output:: >> Screen clear -[12:01:05 AM] File change detected. Starting incremental compilation... +[12:00:59 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:18 AM] Found 1 error. Watching for file changes. +[12:01:12 AM] Found 0 errors. Watching for file changes. @@ -324,14 +310,9 @@ export class C Output:: >> Screen clear -[12:01:22 AM] File change detected. Starting incremental compilation... +[12:01:16 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:35 AM] Found 1 error. Watching for file changes. +[12:01:29 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index 38ef212cd10..261571ca33d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -217,7 +217,23 @@ Output:: >> Screen clear [12:00:54 AM] File change detected. Starting incremental compilation... -[12:01:25 AM] Found 0 errors. Watching for file changes. +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:01:07 AM] Found 2 errors. Watching for file changes. @@ -235,16 +251,10 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -/user/username/projects/myproject/c.ts -/user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/d.ts (computed .d.ts) -/user/username/projects/myproject/e.ts (computed .d.ts) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -286,12 +296,6 @@ export interface Coords { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/c.js] file written with same contents -//// [/user/username/projects/myproject/c.d.ts] file written with same contents -//// [/user/username/projects/myproject/d.js] file written with same contents -//// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.js] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents Change:: Rename property x to x2 of interface Coords to revert back to original text @@ -309,9 +313,25 @@ export interface Coords { Output:: >> Screen clear -[12:01:29 AM] File change detected. Starting incremental compilation... +[12:01:11 AM] File change detected. Starting incremental compilation... -[12:01:42 AM] Found 0 errors. Watching for file changes. +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:01:24 AM] Found 2 errors. Watching for file changes. @@ -391,9 +411,25 @@ export interface Coords { Output:: >> Screen clear -[12:01:46 AM] File change detected. Starting incremental compilation... +[12:01:28 AM] File change detected. Starting incremental compilation... -[12:01:59 AM] Found 0 errors. Watching for file changes. +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:01:41 AM] Found 2 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js index 28f3a658982..3606da89088 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -256,13 +256,7 @@ Output:: >> Screen clear [12:01:06 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:01:43 AM] Found 1 error. Watching for file changes. +[12:01:19 AM] Found 0 errors. Watching for file changes. @@ -281,18 +275,10 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts /user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -329,14 +315,6 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents -//// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents -//// [/user/username/projects/myproject/app.d.ts] file written with same contents Change:: Rename property title2 to title of interface ITest to revert back to original text @@ -349,15 +327,9 @@ export interface ITest { Output:: >> Screen clear -[12:01:47 AM] File change detected. Starting incremental compilation... +[12:01:23 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:00 AM] Found 1 error. Watching for file changes. +[12:01:36 AM] Found 0 errors. Watching for file changes. @@ -428,15 +400,9 @@ export interface ITest { Output:: >> Screen clear -[12:02:04 AM] File change detected. Starting incremental compilation... +[12:01:40 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:17 AM] Found 1 error. Watching for file changes. +[12:01:53 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js index 78a60956f6c..1b1c6a5f0fa 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -288,13 +288,7 @@ Output:: >> Screen clear [12:01:12 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:01:55 AM] Found 1 error. Watching for file changes. +[12:01:25 AM] Found 0 errors. Watching for file changes. @@ -314,20 +308,10 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts /user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data2.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data2.ts (computed .d.ts) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -366,16 +350,6 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents -//// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents -//// [/user/username/projects/myproject/app.d.ts] file written with same contents Change:: Rename property title2 to title of interface ITest to revert back to original text @@ -388,15 +362,9 @@ export interface ITest { Output:: >> Screen clear -[12:01:59 AM] File change detected. Starting incremental compilation... +[12:01:29 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:12 AM] Found 1 error. Watching for file changes. +[12:01:42 AM] Found 0 errors. Watching for file changes. @@ -470,15 +438,9 @@ export interface ITest { Output:: >> Screen clear -[12:02:16 AM] File change detected. Starting incremental compilation... +[12:01:46 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:29 AM] Found 1 error. Watching for file changes. +[12:01:59 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js index 2390754cc15..ba89be276ea 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -278,7 +278,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -302,7 +302,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -310,7 +310,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -333,7 +333,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1115 + "size": 1249 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -429,7 +429,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -453,7 +453,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -461,7 +461,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -502,7 +502,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1278 + "size": 1412 } @@ -614,7 +614,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -638,7 +638,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -646,7 +646,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -669,7 +669,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1106 + "size": 1240 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js index c8f5d8e9879..881bb3fb807 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -142,7 +142,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -205,7 +205,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -273,7 +273,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.ts-change.js index d37fad35d5b..461b77f5037 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -159,7 +159,7 @@ Output:: 4 console.log(b.c.d);    ~ -[12:01:01 AM] Found 1 error. Watching for file changes. +[12:00:58 AM] Found 1 error. Watching for file changes. @@ -180,7 +180,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (computed .d.ts) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -225,7 +225,6 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/a.js] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents Change:: Rename property d2 to d of class C to revert back to original text @@ -240,9 +239,9 @@ export class C Output:: >> Screen clear -[12:01:05 AM] File change detected. Starting incremental compilation... +[12:01:02 AM] File change detected. Starting incremental compilation... -[12:01:21 AM] Found 0 errors. Watching for file changes. +[12:01:18 AM] Found 0 errors. Watching for file changes. @@ -263,7 +262,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -322,14 +321,14 @@ export class C Output:: >> Screen clear -[12:01:25 AM] File change detected. Starting incremental compilation... +[12:01:22 AM] File change detected. Starting incremental compilation... a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. 4 console.log(b.c.d);    ~ -[12:01:41 AM] Found 1 error. Watching for file changes. +[12:01:38 AM] Found 1 error. Watching for file changes. @@ -350,7 +349,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index c64eaa430fb..80810ab0ec4 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -217,7 +217,7 @@ Output:: >> Screen clear [12:00:54 AM] File change detected. Starting incremental compilation... -[12:01:25 AM] Found 0 errors. Watching for file changes. +[12:01:13 AM] Found 0 errors. Watching for file changes. @@ -237,14 +237,12 @@ Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/b.ts /user/username/projects/myproject/c.ts /user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/d.ts (computed .d.ts) -/user/username/projects/myproject/e.ts (computed .d.ts) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -286,12 +284,8 @@ export interface Coords { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/c.js] file written with same contents //// [/user/username/projects/myproject/c.d.ts] file written with same contents -//// [/user/username/projects/myproject/d.js] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.js] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents Change:: Rename property x to x2 of interface Coords to revert back to original text @@ -309,7 +303,7 @@ export interface Coords { Output:: >> Screen clear -[12:01:29 AM] File change detected. Starting incremental compilation... +[12:01:17 AM] File change detected. Starting incremental compilation... c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. @@ -327,7 +321,7 @@ Output:: 2 getPoint().c.x;    ~ -[12:01:48 AM] Found 2 errors. Watching for file changes. +[12:01:36 AM] Found 2 errors. Watching for file changes. @@ -351,8 +345,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -413,9 +407,9 @@ export interface Coords { Output:: >> Screen clear -[12:01:52 AM] File change detected. Starting incremental compilation... +[12:01:40 AM] File change detected. Starting incremental compilation... -[12:02:14 AM] Found 0 errors. Watching for file changes. +[12:01:59 AM] Found 0 errors. Watching for file changes. @@ -435,14 +429,12 @@ Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/b.ts /user/username/projects/myproject/c.ts /user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -486,4 +478,3 @@ export interface Coords { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/c.d.ts] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/no-circular-import/export.js index 8d05ca1c19f..3daa1e66f2f 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -262,7 +262,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:01:43 AM] Found 1 error. Watching for file changes. +[12:01:31 AM] Found 1 error. Watching for file changes. @@ -289,10 +289,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -329,13 +329,9 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents //// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents Change:: Rename property title2 to title of interface ITest to revert back to original text @@ -349,9 +345,9 @@ export interface ITest { Output:: >> Screen clear -[12:01:47 AM] File change detected. Starting incremental compilation... +[12:01:35 AM] File change detected. Starting incremental compilation... -[12:02:12 AM] Found 0 errors. Watching for file changes. +[12:02:00 AM] Found 0 errors. Watching for file changes. @@ -378,10 +374,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -434,7 +430,7 @@ export interface ITest { Output:: >> Screen clear -[12:02:16 AM] File change detected. Starting incremental compilation... +[12:02:04 AM] File change detected. Starting incremental compilation... lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? @@ -442,7 +438,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:02:41 AM] Found 1 error. Watching for file changes. +[12:02:29 AM] Found 1 error. Watching for file changes. @@ -469,10 +465,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/yes-circular-import/exports.js index d50dd2518dd..d90b5e2271c 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -294,7 +294,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:01:55 AM] Found 1 error. Watching for file changes. +[12:01:40 AM] Found 1 error. Watching for file changes. @@ -323,11 +323,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data2.ts (computed .d.ts) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -366,15 +366,10 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.js] file written with same contents //// [/user/username/projects/myproject/lib2/data2.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents //// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents Change:: Rename property title2 to title of interface ITest to revert back to original text @@ -388,9 +383,9 @@ export interface ITest { Output:: >> Screen clear -[12:01:59 AM] File change detected. Starting incremental compilation... +[12:01:44 AM] File change detected. Starting incremental compilation... -[12:02:27 AM] Found 0 errors. Watching for file changes. +[12:02:12 AM] Found 0 errors. Watching for file changes. @@ -419,11 +414,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -479,7 +474,7 @@ export interface ITest { Output:: >> Screen clear -[12:02:31 AM] File change detected. Starting incremental compilation... +[12:02:16 AM] File change detected. Starting incremental compilation... lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? @@ -487,7 +482,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:02:59 AM] Found 1 error. Watching for file changes. +[12:02:44 AM] Found 1 error. Watching for file changes. @@ -516,11 +511,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js index 3e5507d61da..a7e1626c8dc 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js index 95aaa391d12..59e9152a272 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -102,7 +102,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -137,7 +137,7 @@ export {}; }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -153,9 +153,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -168,7 +165,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 958 + "size": 1003 } @@ -232,7 +229,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -267,7 +264,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -283,9 +280,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -298,7 +292,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 959 + "size": 1004 } @@ -362,7 +356,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -397,7 +391,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -413,9 +407,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -428,7 +419,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 958 + "size": 1003 } @@ -492,7 +483,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -527,7 +518,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -543,9 +534,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -558,6 +546,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 959 + "size": 1004 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js index 25e1c526708..34d7a6f01d1 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -140,7 +140,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-22447130237-export class C\n{\n d = 1;\n}","-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -167,15 +167,15 @@ export {}; }, "./c.ts": { "version": "-22447130237-export class C\n{\n d = 1;\n}", - "signature": "-22447130237-export class C\n{\n d = 1;\n}" + "signature": "-6977846840-export declare class C {\n d: number;\n}\n" }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -191,9 +191,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -206,7 +203,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 957 + "size": 1190 } @@ -224,12 +221,7 @@ Output:: >> Screen clear [12:00:46 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:08 AM] Found 1 error. Watching for file changes. +[12:01:02 AM] Found 0 errors. Watching for file changes. @@ -245,12 +237,10 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/c.ts /user/username/projects/myproject/b.ts -/user/username/projects/myproject/a.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (computed .d.ts) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -295,10 +285,8 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/a.js] file written with same contents -//// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -355,25 +343,13 @@ export declare class C { }, "semanticDiagnosticsPerFile": [ "../../../../a/lib/lib.d.ts", - [ - "./a.ts", - [ - { - "file": "./a.ts", - "start": 82, - "length": 1, - "code": 2339, - "category": 1, - "messageText": "Property 'd' does not exist on type 'C'." - } - ] - ], + "./a.ts", "./b.ts", "./c.ts" ] }, "version": "FakeTSVersion", - "size": 1318 + "size": 1192 } @@ -389,14 +365,9 @@ export class C Output:: >> Screen clear -[12:01:15 AM] File change detected. Starting incremental compilation... +[12:01:09 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:31 AM] Found 1 error. Watching for file changes. +[12:01:25 AM] Found 0 errors. Watching for file changes. @@ -461,7 +432,7 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -518,25 +489,13 @@ export declare class C { }, "semanticDiagnosticsPerFile": [ "../../../../a/lib/lib.d.ts", - [ - "./a.ts", - [ - { - "file": "./a.ts", - "start": 82, - "length": 1, - "code": 2339, - "category": 1, - "messageText": "Property 'd' does not exist on type 'C'." - } - ] - ], + "./a.ts", "./b.ts", "./c.ts" ] }, "version": "FakeTSVersion", - "size": 1316 + "size": 1190 } @@ -552,14 +511,9 @@ export class C Output:: >> Screen clear -[12:01:38 AM] File change detected. Starting incremental compilation... +[12:01:32 AM] File change detected. Starting incremental compilation... -a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. - -4 console.log(b.c.d); -   ~ - -[12:01:54 AM] Found 1 error. Watching for file changes. +[12:01:48 AM] Found 0 errors. Watching for file changes. @@ -624,7 +578,7 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -681,24 +635,12 @@ export declare class C { }, "semanticDiagnosticsPerFile": [ "../../../../a/lib/lib.d.ts", - [ - "./a.ts", - [ - { - "file": "./a.ts", - "start": 82, - "length": 1, - "code": 2339, - "category": 1, - "messageText": "Property 'd' does not exist on type 'C'." - } - ] - ], + "./a.ts", "./b.ts", "./c.ts" ] }, "version": "FakeTSVersion", - "size": 1318 + "size": 1192 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index 8c4566702fc..684bae78c87 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -199,425 +199,7 @@ import "./d"; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts", - "./c.ts", - "./d.ts", - "./e.ts" - ], - "fileNamesList": [ - [ - "./a.ts" - ], - [ - "./b.ts" - ], - [ - "./c.ts" - ], - [ - "./d.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}", - "signature": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}" - }, - "./b.ts": { - "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" - }, - "./c.ts": { - "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" - }, - "./d.ts": { - "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" - }, - "./e.ts": { - "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./b.ts": [ - "./a.ts" - ], - "./c.ts": [ - "./b.ts" - ], - "./d.ts": [ - "./c.ts" - ], - "./e.ts": [ - "./d.ts" - ] - }, - "exportedModulesMap": { - "./b.ts": [ - "./a.ts" - ], - "./c.ts": [ - "./b.ts" - ], - "./d.ts": [ - "./c.ts" - ], - "./e.ts": [ - "./d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts", - [ - "./c.ts", - [ - { - "file": "./c.ts", - "start": 139, - "length": 4, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ x: number; y: number; }' is not assignable to type 'Coords'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.", - "category": 1, - "code": 2353 - } - ] - }, - "relatedInformation": [ - { - "file": "./a.ts", - "start": 47, - "length": 1, - "messageText": "The expected type comes from property 'c' which is declared here on type 'PointWrapper'", - "category": 3, - "code": 6500 - } - ] - } - ] - ], - [ - "./d.ts", - [ - { - "file": "./d.ts", - "start": 45, - "length": 1, - "code": 2339, - "category": 1, - "messageText": "Property 'x' does not exist on type 'Coords'." - } - ] - ], - "./e.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1985 -} - - -Change:: Rename property x2 to x of interface Coords to initialize signatures - -Input:: -//// [/user/username/projects/myproject/a.ts] -export interface Point { - name: string; - c: Coords; -} -export interface Coords { - x: number; - y: number; -} - - -Output:: ->> Screen clear -[12:00:58 AM] File change detected. Starting incremental compilation... - -[12:01:32 AM] Found 0 errors. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts","/user/username/projects/myproject/c.ts","/user/username/projects/myproject/d.ts","/user/username/projects/myproject/e.ts"] -Program options: {"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts -/user/username/projects/myproject/c.ts -/user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts -/user/username/projects/myproject/c.ts -/user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/d.ts (computed .d.ts) -/user/username/projects/myproject/e.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/a.ts: - {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} -/user/username/projects/myproject/b.ts: - {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} -/user/username/projects/myproject/c.ts: - {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} -/user/username/projects/myproject/d.ts: - {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} -/user/username/projects/myproject/e.ts: - {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} -/user/username/projects/myproject: - {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/a.js] file written with same contents -//// [/user/username/projects/myproject/a.d.ts] -export interface Point { - name: string; - c: Coords; -} -export interface Coords { - x: number; - y: number; -} - - -//// [/user/username/projects/myproject/b.js] file written with same contents -//// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/c.js] file written with same contents -//// [/user/username/projects/myproject/c.d.ts] file written with same contents -//// [/user/username/projects/myproject/d.js] file written with same contents -//// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.js] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts", - "./c.ts", - "./d.ts", - "./e.ts" - ], - "fileNamesList": [ - [ - "./a.ts" - ], - [ - "./b.ts" - ], - [ - "./c.ts" - ], - [ - "./d.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}", - "signature": "696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n" - }, - "./b.ts": { - "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" - }, - "./c.ts": { - "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" - }, - "./d.ts": { - "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-3531856636-export {};\n" - }, - "./e.ts": { - "version": "-5185546240-import \"./d\";", - "signature": "-3619301366-import \"./d\";\n" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./b.ts": [ - "./a.ts" - ], - "./c.ts": [ - "./b.ts" - ], - "./d.ts": [ - "./c.ts" - ], - "./e.ts": [ - "./d.ts" - ] - }, - "exportedModulesMap": { - "./b.ts": [ - "./a.ts" - ], - "./c.ts": [ - "./b.ts" - ], - "./e.ts": [ - "./d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts", - "./c.ts", - "./d.ts", - "./e.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1836 -} - - -Change:: Rename property x to x2 of interface Coords to revert back to original text - -Input:: -//// [/user/username/projects/myproject/a.ts] -export interface Point { - name: string; - c: Coords; -} -export interface Coords { - x2: number; - y: number; -} - - -Output:: ->> Screen clear -[12:01:39 AM] File change detected. Starting incremental compilation... - -[12:01:55 AM] Found 0 errors. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts","/user/username/projects/myproject/c.ts","/user/username/projects/myproject/d.ts","/user/username/projects/myproject/e.ts"] -Program options: {"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts -/user/username/projects/myproject/c.ts -/user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/a.ts: - {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} -/user/username/projects/myproject/b.ts: - {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} -/user/username/projects/myproject/c.ts: - {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} -/user/username/projects/myproject/d.ts: - {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} -/user/username/projects/myproject/e.ts: - {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} -/user/username/projects/myproject: - {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/a.js] file written with same contents -//// [/user/username/projects/myproject/a.d.ts] -export interface Point { - name: string; - c: Coords; -} -export interface Coords { - x2: number; - y: number; -} - - -//// [/user/username/projects/myproject/b.js] file written with same contents -//// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -704,17 +286,62 @@ export interface Coords { "../../../../a/lib/lib.d.ts", "./a.ts", "./b.ts", - "./c.ts", - "./d.ts", + [ + "./c.ts", + [ + { + "file": "./c.ts", + "start": 139, + "length": 4, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ x: number; y: number; }' is not assignable to type 'Coords'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.", + "category": 1, + "code": 2353 + } + ] + }, + "relatedInformation": [ + { + "file": "./a.ts", + "start": 47, + "length": 1, + "messageText": "The expected type comes from property 'c' which is declared here on type 'PointWrapper'", + "category": 3, + "code": 6500 + } + ] + } + ] + ], + [ + "./d.ts", + [ + { + "file": "./d.ts", + "start": 45, + "length": 1, + "code": 2339, + "category": 1, + "messageText": "Property 'x' does not exist on type 'Coords'." + } + ] + ], "./e.ts" ] }, "version": "FakeTSVersion", - "size": 1839 + "size": 2501 } -Change:: Rename property x2 to x of interface Coords +Change:: Rename property x2 to x of interface Coords to initialize signatures Input:: //// [/user/username/projects/myproject/a.ts] @@ -730,9 +357,25 @@ export interface Coords { Output:: >> Screen clear -[12:02:02 AM] File change detected. Starting incremental compilation... +[12:00:58 AM] File change detected. Starting incremental compilation... -[12:02:18 AM] Found 0 errors. Watching for file changes. +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:01:14 AM] Found 2 errors. Watching for file changes. @@ -796,7 +439,7 @@ export interface Coords { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -883,12 +526,537 @@ export interface Coords { "../../../../a/lib/lib.d.ts", "./a.ts", "./b.ts", - "./c.ts", - "./d.ts", + [ + "./c.ts", + [ + { + "file": "./c.ts", + "start": 139, + "length": 4, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ x: number; y: number; }' is not assignable to type 'Coords'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.", + "category": 1, + "code": 2353 + } + ] + }, + "relatedInformation": [ + { + "file": "./a.ts", + "start": 47, + "length": 1, + "messageText": "The expected type comes from property 'c' which is declared here on type 'PointWrapper'", + "category": 3, + "code": 6500 + } + ] + } + ] + ], + [ + "./d.ts", + [ + { + "file": "./d.ts", + "start": 45, + "length": 1, + "code": 2339, + "category": 1, + "messageText": "Property 'x' does not exist on type 'Coords'." + } + ] + ], "./e.ts" ] }, "version": "FakeTSVersion", - "size": 1836 + "size": 2498 +} + + +Change:: Rename property x to x2 of interface Coords to revert back to original text + +Input:: +//// [/user/username/projects/myproject/a.ts] +export interface Point { + name: string; + c: Coords; +} +export interface Coords { + x2: number; + y: number; +} + + +Output:: +>> Screen clear +[12:01:21 AM] File change detected. Starting incremental compilation... + +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:01:37 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts","/user/username/projects/myproject/c.ts","/user/username/projects/myproject/d.ts","/user/username/projects/myproject/e.ts"] +Program options: {"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts +/user/username/projects/myproject/c.ts +/user/username/projects/myproject/d.ts +/user/username/projects/myproject/e.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/a.ts (computed .d.ts) +/user/username/projects/myproject/b.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/a.ts: + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} +/user/username/projects/myproject/b.ts: + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} +/user/username/projects/myproject/c.ts: + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} +/user/username/projects/myproject/d.ts: + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} +/user/username/projects/myproject/e.ts: + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/user/username/projects/myproject: + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/a.js] file written with same contents +//// [/user/username/projects/myproject/a.d.ts] +export interface Point { + name: string; + c: Coords; +} +export interface Coords { + x2: number; + y: number; +} + + +//// [/user/username/projects/myproject/b.js] file written with same contents +//// [/user/username/projects/myproject/b.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts", + "./e.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ], + [ + "./c.ts" + ], + [ + "./d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}", + "signature": "8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n" + }, + "./b.ts": { + "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" + }, + "./c.ts": { + "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" + }, + "./d.ts": { + "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", + "signature": "-3531856636-export {};\n" + }, + "./e.ts": { + "version": "-5185546240-import \"./d\";", + "signature": "-3619301366-import \"./d\";\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./b.ts": [ + "./a.ts" + ], + "./c.ts": [ + "./b.ts" + ], + "./d.ts": [ + "./c.ts" + ], + "./e.ts": [ + "./d.ts" + ] + }, + "exportedModulesMap": { + "./b.ts": [ + "./a.ts" + ], + "./c.ts": [ + "./b.ts" + ], + "./e.ts": [ + "./d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts", + [ + "./c.ts", + [ + { + "file": "./c.ts", + "start": 139, + "length": 4, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ x: number; y: number; }' is not assignable to type 'Coords'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.", + "category": 1, + "code": 2353 + } + ] + }, + "relatedInformation": [ + { + "file": "./a.ts", + "start": 47, + "length": 1, + "messageText": "The expected type comes from property 'c' which is declared here on type 'PointWrapper'", + "category": 3, + "code": 6500 + } + ] + } + ] + ], + [ + "./d.ts", + [ + { + "file": "./d.ts", + "start": 45, + "length": 1, + "code": 2339, + "category": 1, + "messageText": "Property 'x' does not exist on type 'Coords'." + } + ] + ], + "./e.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2501 +} + + +Change:: Rename property x2 to x of interface Coords + +Input:: +//// [/user/username/projects/myproject/a.ts] +export interface Point { + name: string; + c: Coords; +} +export interface Coords { + x: number; + y: number; +} + + +Output:: +>> Screen clear +[12:01:44 AM] File change detected. Starting incremental compilation... + +c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. + Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. + +6 x: 1, +   ~~~~ + + a.ts:3:5 + 3 c: Coords; +    ~ + The expected type comes from property 'c' which is declared here on type 'PointWrapper' + +d.ts:2:14 - error TS2339: Property 'x' does not exist on type 'Coords'. + +2 getPoint().c.x; +   ~ + +[12:02:00 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts","/user/username/projects/myproject/c.ts","/user/username/projects/myproject/d.ts","/user/username/projects/myproject/e.ts"] +Program options: {"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts +/user/username/projects/myproject/c.ts +/user/username/projects/myproject/d.ts +/user/username/projects/myproject/e.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/a.ts (computed .d.ts) +/user/username/projects/myproject/b.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/a.ts: + {"fileName":"/user/username/projects/myproject/a.ts","pollingInterval":250} +/user/username/projects/myproject/b.ts: + {"fileName":"/user/username/projects/myproject/b.ts","pollingInterval":250} +/user/username/projects/myproject/c.ts: + {"fileName":"/user/username/projects/myproject/c.ts","pollingInterval":250} +/user/username/projects/myproject/d.ts: + {"fileName":"/user/username/projects/myproject/d.ts","pollingInterval":250} +/user/username/projects/myproject/e.ts: + {"fileName":"/user/username/projects/myproject/e.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/user/username/projects/myproject: + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/a.js] file written with same contents +//// [/user/username/projects/myproject/a.d.ts] +export interface Point { + name: string; + c: Coords; +} +export interface Coords { + x: number; + y: number; +} + + +//// [/user/username/projects/myproject/b.js] file written with same contents +//// [/user/username/projects/myproject/b.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts", + "./e.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ], + [ + "./c.ts" + ], + [ + "./d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}", + "signature": "696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n" + }, + "./b.ts": { + "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" + }, + "./c.ts": { + "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" + }, + "./d.ts": { + "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", + "signature": "-3531856636-export {};\n" + }, + "./e.ts": { + "version": "-5185546240-import \"./d\";", + "signature": "-3619301366-import \"./d\";\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./b.ts": [ + "./a.ts" + ], + "./c.ts": [ + "./b.ts" + ], + "./d.ts": [ + "./c.ts" + ], + "./e.ts": [ + "./d.ts" + ] + }, + "exportedModulesMap": { + "./b.ts": [ + "./a.ts" + ], + "./c.ts": [ + "./b.ts" + ], + "./e.ts": [ + "./d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts", + [ + "./c.ts", + [ + { + "file": "./c.ts", + "start": 139, + "length": 4, + "code": 2322, + "category": 1, + "messageText": { + "messageText": "Type '{ x: number; y: number; }' is not assignable to type 'Coords'.", + "category": 1, + "code": 2322, + "next": [ + { + "messageText": "Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.", + "category": 1, + "code": 2353 + } + ] + }, + "relatedInformation": [ + { + "file": "./a.ts", + "start": 47, + "length": 1, + "messageText": "The expected type comes from property 'c' which is declared here on type 'PointWrapper'", + "category": 3, + "code": 6500 + } + ] + } + ] + ], + [ + "./d.ts", + [ + { + "file": "./d.ts", + "start": 45, + "length": 1, + "code": 2339, + "category": 1, + "messageText": "Property 'x' does not exist on type 'Coords'." + } + ] + ], + "./e.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2498 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js index e9705bfdad7..21eff29fc59 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -243,431 +243,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./lib1/tools/tools.interface.ts", - "./lib1/tools/public.ts", - "./lib1/public.ts", - "./lib2/data.ts", - "./lib2/public.ts", - "./app.ts" - ], - "fileNamesList": [ - [ - "./lib2/public.ts" - ], - [ - "./lib1/tools/public.ts" - ], - [ - "./lib1/tools/tools.interface.ts" - ], - [ - "./lib1/public.ts" - ], - [ - "./lib2/data.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./lib1/tools/tools.interface.ts": { - "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" - }, - "./lib1/tools/public.ts": { - "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" - }, - "./lib1/public.ts": { - "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" - }, - "./lib2/data.ts": { - "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" - }, - "./lib2/public.ts": { - "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" - }, - "./app.ts": { - "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./app.ts", - "./lib1/public.ts", - "./lib1/tools/public.ts", - "./lib1/tools/tools.interface.ts", - "./lib2/data.ts", - "./lib2/public.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1427 -} - - -Change:: Rename property title to title2 of interface ITest to initialize signatures - -Input:: -//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] -export interface ITest { - title2: string; -} - - -Output:: ->> Screen clear -[12:01:10 AM] File change detected. Starting incremental compilation... - -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:01:50 AM] Found 1 error. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/app.ts"] -Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/app.ts: - {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/public.ts: - {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data.ts: - {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] -export interface ITest { - title2: string; -} - - -//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents -//// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents -//// [/user/username/projects/myproject/app.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./lib1/tools/tools.interface.ts", - "./lib1/tools/public.ts", - "./lib1/public.ts", - "./lib2/data.ts", - "./lib2/public.ts", - "./app.ts" - ], - "fileNamesList": [ - [ - "./lib2/public.ts" - ], - [ - "./lib1/tools/public.ts" - ], - [ - "./lib1/tools/tools.interface.ts" - ], - [ - "./lib1/public.ts" - ], - [ - "./lib2/data.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./lib1/tools/tools.interface.ts": { - "version": "-3501597171-export interface ITest {\n title2: string;\n}", - "signature": "-3883556937-export interface ITest {\n title2: string;\n}\n" - }, - "./lib1/tools/public.ts": { - "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13735034501-export * from \"./tools.interface\";\n" - }, - "./lib1/public.ts": { - "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-4396051542-export * from \"./tools/public\";\n" - }, - "./lib2/data.ts": { - "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" - }, - "./lib2/public.ts": { - "version": "-9530042629-export * from \"./data\";", - "signature": "-9548728731-export * from \"./data\";\n" - }, - "./app.ts": { - "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-18990360330-export declare class App {\n constructor();\n}\n" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "exportedModulesMap": { - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./app.ts", - "./lib1/public.ts", - "./lib1/tools/public.ts", - "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 121, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], - "./lib2/public.ts" - ] - }, - "version": "FakeTSVersion", - "size": 2327 -} - - -Change:: Rename property title2 to title of interface ITest to revert back to original text - -Input:: -//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] -export interface ITest { - title: string; -} - - -Output:: ->> Screen clear -[12:01:57 AM] File change detected. Starting incremental compilation... - -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:13 AM] Found 1 error. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/app.ts"] -Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/app.ts: - {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/public.ts: - {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data.ts: - {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] -export interface ITest { - title: string; -} - - -//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -770,39 +346,16 @@ export interface ITest { "./lib1/public.ts", "./lib1/tools/public.ts", "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 121, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], + "./lib2/data.ts", "./lib2/public.ts" ] }, "version": "FakeTSVersion", - "size": 2325 + "size": 1950 } -Change:: Rename property title to title2 of interface ITest +Change:: Rename property title to title2 of interface ITest to initialize signatures Input:: //// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] @@ -813,15 +366,9 @@ export interface ITest { Output:: >> Screen clear -[12:02:20 AM] File change detected. Starting incremental compilation... +[12:01:10 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:36 AM] Found 1 error. Watching for file changes. +[12:01:26 AM] Found 0 errors. Watching for file changes. @@ -881,7 +428,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -984,34 +531,381 @@ export interface ITest { "./lib1/public.ts", "./lib1/tools/public.ts", "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 121, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], + "./lib2/data.ts", "./lib2/public.ts" ] }, "version": "FakeTSVersion", - "size": 2327 + "size": 1952 +} + + +Change:: Rename property title2 to title of interface ITest to revert back to original text + +Input:: +//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] +export interface ITest { + title: string; +} + + +Output:: +>> Screen clear +[12:01:33 AM] File change detected. Starting incremental compilation... + +[12:01:49 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/app.ts"] +Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts +/user/username/projects/myproject/lib1/public.ts +/user/username/projects/myproject/lib2/data.ts +/user/username/projects/myproject/lib2/public.ts +/user/username/projects/myproject/app.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/app.ts: + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/public.ts: + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data.ts: + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/tools.interface.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] +export interface ITest { + title: string; +} + + +//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./lib1/tools/tools.interface.ts", + "./lib1/tools/public.ts", + "./lib1/public.ts", + "./lib2/data.ts", + "./lib2/public.ts", + "./app.ts" + ], + "fileNamesList": [ + [ + "./lib2/public.ts" + ], + [ + "./lib1/tools/public.ts" + ], + [ + "./lib1/tools/tools.interface.ts" + ], + [ + "./lib1/public.ts" + ], + [ + "./lib2/data.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib1/tools/tools.interface.ts": { + "version": "-4369626085-export interface ITest {\n title: string;\n}", + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" + }, + "./lib1/tools/public.ts": { + "version": "-13301115055-export * from \"./tools.interface\";", + "signature": "-13735034501-export * from \"./tools.interface\";\n" + }, + "./lib1/public.ts": { + "version": "-5078933600-export * from \"./tools/public\";", + "signature": "-4396051542-export * from \"./tools/public\";\n" + }, + "./lib2/data.ts": { + "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" + }, + "./lib2/public.ts": { + "version": "-9530042629-export * from \"./data\";", + "signature": "-9548728731-export * from \"./data\";\n" + }, + "./app.ts": { + "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./app.ts": [ + "./lib2/public.ts" + ], + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "exportedModulesMap": { + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./app.ts", + "./lib1/public.ts", + "./lib1/tools/public.ts", + "./lib1/tools/tools.interface.ts", + "./lib2/data.ts", + "./lib2/public.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1950 +} + + +Change:: Rename property title to title2 of interface ITest + +Input:: +//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] +export interface ITest { + title2: string; +} + + +Output:: +>> Screen clear +[12:01:56 AM] File change detected. Starting incremental compilation... + +[12:02:12 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/app.ts"] +Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts +/user/username/projects/myproject/lib1/public.ts +/user/username/projects/myproject/lib2/data.ts +/user/username/projects/myproject/lib2/public.ts +/user/username/projects/myproject/app.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/app.ts: + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/public.ts: + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data.ts: + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/tools.interface.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] +export interface ITest { + title2: string; +} + + +//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./lib1/tools/tools.interface.ts", + "./lib1/tools/public.ts", + "./lib1/public.ts", + "./lib2/data.ts", + "./lib2/public.ts", + "./app.ts" + ], + "fileNamesList": [ + [ + "./lib2/public.ts" + ], + [ + "./lib1/tools/public.ts" + ], + [ + "./lib1/tools/tools.interface.ts" + ], + [ + "./lib1/public.ts" + ], + [ + "./lib2/data.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib1/tools/tools.interface.ts": { + "version": "-3501597171-export interface ITest {\n title2: string;\n}", + "signature": "-3883556937-export interface ITest {\n title2: string;\n}\n" + }, + "./lib1/tools/public.ts": { + "version": "-13301115055-export * from \"./tools.interface\";", + "signature": "-13735034501-export * from \"./tools.interface\";\n" + }, + "./lib1/public.ts": { + "version": "-5078933600-export * from \"./tools/public\";", + "signature": "-4396051542-export * from \"./tools/public\";\n" + }, + "./lib2/data.ts": { + "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" + }, + "./lib2/public.ts": { + "version": "-9530042629-export * from \"./data\";", + "signature": "-9548728731-export * from \"./data\";\n" + }, + "./app.ts": { + "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./app.ts": [ + "./lib2/public.ts" + ], + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "exportedModulesMap": { + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./app.ts", + "./lib1/public.ts", + "./lib1/tools/public.ts", + "./lib1/tools/tools.interface.ts", + "./lib2/data.ts", + "./lib2/public.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1952 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js index b3d83d79b0a..a0b4491f090 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -275,471 +275,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./lib1/tools/tools.interface.ts", - "./lib1/tools/public.ts", - "./lib1/public.ts", - "./lib2/data2.ts", - "./lib2/data.ts", - "./lib2/public.ts", - "./app.ts" - ], - "fileNamesList": [ - [ - "./lib2/public.ts" - ], - [ - "./lib1/tools/public.ts" - ], - [ - "./lib1/tools/tools.interface.ts" - ], - [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - [ - "./lib2/data.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./lib1/tools/tools.interface.ts": { - "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" - }, - "./lib1/tools/public.ts": { - "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" - }, - "./lib1/public.ts": { - "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" - }, - "./lib2/data2.ts": { - "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" - }, - "./lib2/data.ts": { - "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" - }, - "./lib2/public.ts": { - "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" - }, - "./app.ts": { - "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - "./lib2/data2.ts": [ - "./lib2/data.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - "./lib2/data2.ts": [ - "./lib2/data.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./app.ts", - "./lib1/public.ts", - "./lib1/tools/public.ts", - "./lib1/tools/tools.interface.ts", - "./lib2/data.ts", - "./lib2/data2.ts", - "./lib2/public.ts" - ] - }, - "version": "FakeTSVersion", - "size": 1612 -} - - -Change:: Rename property title to title2 of interface ITest to initialize signatures - -Input:: -//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] -export interface ITest { - title2: string; -} - - -Output:: ->> Screen clear -[12:01:16 AM] File change detected. Starting incremental compilation... - -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:02 AM] Found 1 error. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/app.ts"] -Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data2.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data2.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data2.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/app.ts: - {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/public.ts: - {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data.ts: - {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data2.ts: - {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] -export interface ITest { - title2: string; -} - - -//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents -//// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents -//// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents -//// [/user/username/projects/myproject/app.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} - -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "program": { - "fileNames": [ - "../../../../a/lib/lib.d.ts", - "./lib1/tools/tools.interface.ts", - "./lib1/tools/public.ts", - "./lib1/public.ts", - "./lib2/data2.ts", - "./lib2/data.ts", - "./lib2/public.ts", - "./app.ts" - ], - "fileNamesList": [ - [ - "./lib2/public.ts" - ], - [ - "./lib1/tools/public.ts" - ], - [ - "./lib1/tools/tools.interface.ts" - ], - [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - [ - "./lib2/data.ts" - ] - ], - "fileInfos": { - "../../../../a/lib/lib.d.ts": { - "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "affectsGlobalScope": true - }, - "./lib1/tools/tools.interface.ts": { - "version": "-3501597171-export interface ITest {\n title2: string;\n}", - "signature": "-3883556937-export interface ITest {\n title2: string;\n}\n" - }, - "./lib1/tools/public.ts": { - "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13735034501-export * from \"./tools.interface\";\n" - }, - "./lib1/public.ts": { - "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-4396051542-export * from \"./tools/public\";\n" - }, - "./lib2/data2.ts": { - "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" - }, - "./lib2/data.ts": { - "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" - }, - "./lib2/public.ts": { - "version": "-9530042629-export * from \"./data\";", - "signature": "-9548728731-export * from \"./data\";\n" - }, - "./app.ts": { - "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-18990360330-export declare class App {\n constructor();\n}\n" - } - }, - "options": { - "assumeChangesOnlyAffectDirectDependencies": true, - "declaration": true - }, - "referencedMap": { - "./app.ts": [ - "./lib2/public.ts" - ], - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - "./lib2/data2.ts": [ - "./lib2/data.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "exportedModulesMap": { - "./lib1/public.ts": [ - "./lib1/tools/public.ts" - ], - "./lib1/tools/public.ts": [ - "./lib1/tools/tools.interface.ts" - ], - "./lib2/data.ts": [ - "./lib1/public.ts", - "./lib2/data2.ts" - ], - "./lib2/data2.ts": [ - "./lib2/data.ts" - ], - "./lib2/public.ts": [ - "./lib2/data.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", - "./app.ts", - "./lib1/public.ts", - "./lib1/tools/public.ts", - "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 174, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], - "./lib2/data2.ts", - "./lib2/public.ts" - ] - }, - "version": "FakeTSVersion", - "size": 2690 -} - - -Change:: Rename property title2 to title of interface ITest to revert back to original text - -Input:: -//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] -export interface ITest { - title: string; -} - - -Output:: ->> Screen clear -[12:02:09 AM] File change detected. Starting incremental compilation... - -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:25 AM] Found 1 error. Watching for file changes. - - - -Program root files: ["/user/username/projects/myproject/app.ts"] -Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely -Program files:: -/a/lib/lib.d.ts -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts -/user/username/projects/myproject/lib1/public.ts -/user/username/projects/myproject/lib2/data2.ts -/user/username/projects/myproject/lib2/data.ts -/user/username/projects/myproject/lib2/public.ts -/user/username/projects/myproject/app.ts - -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts -/user/username/projects/myproject/lib1/tools/public.ts - -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) - -WatchedFiles:: -/user/username/projects/myproject/tsconfig.json: - {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} -/user/username/projects/myproject/app.ts: - {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/public.ts: - {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data.ts: - {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/public.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} -/user/username/projects/myproject/lib1/tools/tools.interface.ts: - {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} -/user/username/projects/myproject/lib2/data2.ts: - {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} - -FsWatches:: - -FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} - -exitCode:: ExitStatus.undefined - -//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] -export interface ITest { - title: string; -} - - -//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents -//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -856,40 +392,17 @@ export interface ITest { "./lib1/public.ts", "./lib1/tools/public.ts", "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 174, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], + "./lib2/data.ts", "./lib2/data2.ts", "./lib2/public.ts" ] }, "version": "FakeTSVersion", - "size": 2688 + "size": 2313 } -Change:: Rename property title to title2 of interface ITest +Change:: Rename property title to title2 of interface ITest to initialize signatures Input:: //// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] @@ -900,15 +413,9 @@ export interface ITest { Output:: >> Screen clear -[12:02:32 AM] File change detected. Starting incremental compilation... +[12:01:16 AM] File change detected. Starting incremental compilation... -lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. - Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? - -5 title: "title" -   ~~~~~~~~~~~~~~ - -[12:02:48 AM] Found 1 error. Watching for file changes. +[12:01:32 AM] Found 0 errors. Watching for file changes. @@ -971,7 +478,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1088,35 +595,418 @@ export interface ITest { "./lib1/public.ts", "./lib1/tools/public.ts", "./lib1/tools/tools.interface.ts", - [ - "./lib2/data.ts", - [ - { - "file": "./lib2/data.ts", - "start": 174, - "length": 14, - "code": 2322, - "category": 1, - "messageText": { - "messageText": "Type '{ title: string; }' is not assignable to type 'ITest'.", - "category": 1, - "code": 2322, - "next": [ - { - "messageText": "Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?", - "category": 1, - "code": 2561 - } - ] - } - } - ] - ], + "./lib2/data.ts", "./lib2/data2.ts", "./lib2/public.ts" ] }, "version": "FakeTSVersion", - "size": 2690 + "size": 2315 +} + + +Change:: Rename property title2 to title of interface ITest to revert back to original text + +Input:: +//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] +export interface ITest { + title: string; +} + + +Output:: +>> Screen clear +[12:01:39 AM] File change detected. Starting incremental compilation... + +[12:01:55 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/app.ts"] +Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts +/user/username/projects/myproject/lib1/public.ts +/user/username/projects/myproject/lib2/data2.ts +/user/username/projects/myproject/lib2/data.ts +/user/username/projects/myproject/lib2/public.ts +/user/username/projects/myproject/app.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/app.ts: + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/public.ts: + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data.ts: + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/tools.interface.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data2.ts: + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] +export interface ITest { + title: string; +} + + +//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./lib1/tools/tools.interface.ts", + "./lib1/tools/public.ts", + "./lib1/public.ts", + "./lib2/data2.ts", + "./lib2/data.ts", + "./lib2/public.ts", + "./app.ts" + ], + "fileNamesList": [ + [ + "./lib2/public.ts" + ], + [ + "./lib1/tools/public.ts" + ], + [ + "./lib1/tools/tools.interface.ts" + ], + [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + [ + "./lib2/data.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib1/tools/tools.interface.ts": { + "version": "-4369626085-export interface ITest {\n title: string;\n}", + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" + }, + "./lib1/tools/public.ts": { + "version": "-13301115055-export * from \"./tools.interface\";", + "signature": "-13735034501-export * from \"./tools.interface\";\n" + }, + "./lib1/public.ts": { + "version": "-5078933600-export * from \"./tools/public\";", + "signature": "-4396051542-export * from \"./tools/public\";\n" + }, + "./lib2/data2.ts": { + "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" + }, + "./lib2/data.ts": { + "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" + }, + "./lib2/public.ts": { + "version": "-9530042629-export * from \"./data\";", + "signature": "-9548728731-export * from \"./data\";\n" + }, + "./app.ts": { + "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./app.ts": [ + "./lib2/public.ts" + ], + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + "./lib2/data2.ts": [ + "./lib2/data.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "exportedModulesMap": { + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + "./lib2/data2.ts": [ + "./lib2/data.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./app.ts", + "./lib1/public.ts", + "./lib1/tools/public.ts", + "./lib1/tools/tools.interface.ts", + "./lib2/data.ts", + "./lib2/data2.ts", + "./lib2/public.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2313 +} + + +Change:: Rename property title to title2 of interface ITest + +Input:: +//// [/user/username/projects/myproject/lib1/tools/tools.interface.ts] +export interface ITest { + title2: string; +} + + +Output:: +>> Screen clear +[12:02:02 AM] File change detected. Starting incremental compilation... + +[12:02:18 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/user/username/projects/myproject/app.ts"] +Program options: {"baseUrl":"/user/username/projects/myproject","assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts +/user/username/projects/myproject/lib1/public.ts +/user/username/projects/myproject/lib2/data2.ts +/user/username/projects/myproject/lib2/data.ts +/user/username/projects/myproject/lib2/public.ts +/user/username/projects/myproject/app.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts +/user/username/projects/myproject/lib1/tools/public.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/app.ts: + {"fileName":"/user/username/projects/myproject/app.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/public.ts: + {"fileName":"/user/username/projects/myproject/lib2/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data.ts: + {"fileName":"/user/username/projects/myproject/lib2/data.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/public.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/public.ts","pollingInterval":250} +/user/username/projects/myproject/lib1/tools/tools.interface.ts: + {"fileName":"/user/username/projects/myproject/lib1/tools/tools.interface.ts","pollingInterval":250} +/user/username/projects/myproject/lib2/data2.ts: + {"fileName":"/user/username/projects/myproject/lib2/data2.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/lib1/tools/tools.interface.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/tools.interface.d.ts] +export interface ITest { + title2: string; +} + + +//// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents +//// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./lib1/tools/tools.interface.ts", + "./lib1/tools/public.ts", + "./lib1/public.ts", + "./lib2/data2.ts", + "./lib2/data.ts", + "./lib2/public.ts", + "./app.ts" + ], + "fileNamesList": [ + [ + "./lib2/public.ts" + ], + [ + "./lib1/tools/public.ts" + ], + [ + "./lib1/tools/tools.interface.ts" + ], + [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + [ + "./lib2/data.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib1/tools/tools.interface.ts": { + "version": "-3501597171-export interface ITest {\n title2: string;\n}", + "signature": "-3883556937-export interface ITest {\n title2: string;\n}\n" + }, + "./lib1/tools/public.ts": { + "version": "-13301115055-export * from \"./tools.interface\";", + "signature": "-13735034501-export * from \"./tools.interface\";\n" + }, + "./lib1/public.ts": { + "version": "-5078933600-export * from \"./tools/public\";", + "signature": "-4396051542-export * from \"./tools/public\";\n" + }, + "./lib2/data2.ts": { + "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" + }, + "./lib2/data.ts": { + "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" + }, + "./lib2/public.ts": { + "version": "-9530042629-export * from \"./data\";", + "signature": "-9548728731-export * from \"./data\";\n" + }, + "./app.ts": { + "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" + } + }, + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true + }, + "referencedMap": { + "./app.ts": [ + "./lib2/public.ts" + ], + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + "./lib2/data2.ts": [ + "./lib2/data.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "exportedModulesMap": { + "./lib1/public.ts": [ + "./lib1/tools/public.ts" + ], + "./lib1/tools/public.ts": [ + "./lib1/tools/tools.interface.ts" + ], + "./lib2/data.ts": [ + "./lib1/public.ts", + "./lib2/data2.ts" + ], + "./lib2/data2.ts": [ + "./lib2/data.ts" + ], + "./lib2/public.ts": [ + "./lib2/data.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./app.ts", + "./lib1/public.ts", + "./lib1/tools/public.ts", + "./lib1/tools/tools.interface.ts", + "./lib2/data.ts", + "./lib2/data2.ts", + "./lib2/public.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2315 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js index a4f88ae81e0..bfdf6d81126 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -278,7 +278,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -302,7 +302,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -310,7 +310,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -333,7 +333,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1115 + "size": 1249 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -429,7 +429,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -453,7 +453,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -461,7 +461,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -502,7 +502,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1278 + "size": 1412 } @@ -614,7 +614,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -638,7 +638,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -646,7 +646,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -669,7 +669,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1106 + "size": 1240 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js index 869ce1a85e6..3f2c70b67c6 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js @@ -278,7 +278,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -302,7 +302,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -310,7 +310,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -333,7 +333,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1115 + "size": 1249 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -429,7 +429,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -453,7 +453,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -461,7 +461,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -502,7 +502,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1278 + "size": 1412 } @@ -614,7 +614,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -638,7 +638,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -646,7 +646,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -669,7 +669,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1106 + "size": 1240 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js index 8411f24f3fa..c440413b8f5 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -102,7 +102,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -137,7 +137,7 @@ export {}; }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -152,9 +152,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -167,7 +164,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 909 + "size": 954 } @@ -211,7 +208,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -239,7 +236,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -274,7 +271,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -289,9 +286,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -316,7 +310,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1036 + "size": 1081 } @@ -355,7 +349,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -383,7 +377,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -418,7 +412,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -433,9 +427,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -448,7 +439,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 909 + "size": 954 } @@ -492,7 +483,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -520,7 +511,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -555,7 +546,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -570,9 +561,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -597,6 +585,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1036 + "size": 1081 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.ts-change.js index 5d9c84706fc..e9cf2334387 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -140,7 +140,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-22447130237-export class C\n{\n d = 1;\n}","-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -167,15 +167,15 @@ export {}; }, "./c.ts": { "version": "-22447130237-export class C\n{\n d = 1;\n}", - "signature": "-22447130237-export class C\n{\n d = 1;\n}" + "signature": "-6977846840-export declare class C {\n d: number;\n}\n" }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -190,9 +190,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -205,7 +202,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 908 + "size": 1141 } @@ -228,7 +225,7 @@ Output:: 4 console.log(b.c.d);    ~ -[12:01:08 AM] Found 1 error. Watching for file changes. +[12:01:05 AM] Found 1 error. Watching for file changes. @@ -249,7 +246,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (computed .d.ts) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -294,7 +291,6 @@ export declare class C { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/a.js] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} @@ -387,9 +383,9 @@ export class C Output:: >> Screen clear -[12:01:15 AM] File change detected. Starting incremental compilation... +[12:01:12 AM] File change detected. Starting incremental compilation... -[12:01:34 AM] Found 0 errors. Watching for file changes. +[12:01:31 AM] Found 0 errors. Watching for file changes. @@ -410,7 +406,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -457,7 +453,7 @@ export declare class C { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -492,7 +488,7 @@ export declare class C { }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -507,9 +503,6 @@ export declare class C { ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -522,7 +515,7 @@ export declare class C { ] }, "version": "FakeTSVersion", - "size": 1096 + "size": 1141 } @@ -538,14 +531,14 @@ export class C Output:: >> Screen clear -[12:01:41 AM] File change detected. Starting incremental compilation... +[12:01:38 AM] File change detected. Starting incremental compilation... a.ts:4:17 - error TS2339: Property 'd' does not exist on type 'C'. 4 console.log(b.c.d);    ~ -[12:02:00 AM] Found 1 error. Watching for file changes. +[12:01:57 AM] Found 1 error. Watching for file changes. @@ -566,7 +559,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -613,7 +606,7 @@ export declare class C { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -648,7 +641,7 @@ export declare class C { }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -663,9 +656,6 @@ export declare class C { ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -690,6 +680,6 @@ export declare class C { ] }, "version": "FakeTSVersion", - "size": 1224 + "size": 1269 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index 2797064f88b..081531da6d4 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -199,7 +199,7 @@ import "./d"; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -234,23 +234,23 @@ import "./d"; }, "./a.ts": { "version": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}", - "signature": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}" + "signature": "8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n" }, "./b.ts": { "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -277,9 +277,6 @@ import "./d"; "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -339,7 +336,7 @@ import "./d"; ] }, "version": "FakeTSVersion", - "size": 1936 + "size": 2452 } @@ -361,7 +358,7 @@ Output:: >> Screen clear [12:00:58 AM] File change detected. Starting incremental compilation... -[12:01:32 AM] Found 0 errors. Watching for file changes. +[12:01:20 AM] Found 0 errors. Watching for file changes. @@ -381,14 +378,12 @@ Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/b.ts /user/username/projects/myproject/c.ts /user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/d.ts (computed .d.ts) -/user/username/projects/myproject/e.ts (computed .d.ts) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -430,12 +425,8 @@ export interface Coords { //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/c.js] file written with same contents //// [/user/username/projects/myproject/c.d.ts] file written with same contents -//// [/user/username/projects/myproject/d.js] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.js] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} @@ -549,7 +540,7 @@ export interface Coords { Output:: >> Screen clear -[12:01:39 AM] File change detected. Starting incremental compilation... +[12:01:27 AM] File change detected. Starting incremental compilation... c.ts:6:13 - error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'Coords'. Object literal may only specify known properties, and 'x' does not exist in type 'Coords'. @@ -567,7 +558,7 @@ Output:: 2 getPoint().c.x;    ~ -[12:02:01 AM] Found 2 errors. Watching for file changes. +[12:01:49 AM] Found 2 errors. Watching for file changes. @@ -591,8 +582,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -637,7 +628,7 @@ export interface Coords { //// [/user/username/projects/myproject/c.d.ts] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;",{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -680,11 +671,11 @@ export interface Coords { }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", @@ -715,9 +706,6 @@ export interface Coords { "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -777,7 +765,7 @@ export interface Coords { ] }, "version": "FakeTSVersion", - "size": 2278 + "size": 2452 } @@ -797,9 +785,9 @@ export interface Coords { Output:: >> Screen clear -[12:02:08 AM] File change detected. Starting incremental compilation... +[12:01:56 AM] File change detected. Starting incremental compilation... -[12:02:33 AM] Found 0 errors. Watching for file changes. +[12:02:18 AM] Found 0 errors. Watching for file changes. @@ -819,14 +807,12 @@ Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/b.ts /user/username/projects/myproject/c.ts /user/username/projects/myproject/d.ts -/user/username/projects/myproject/e.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) /user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -870,9 +856,8 @@ export interface Coords { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/c.d.ts] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/e.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -915,15 +900,15 @@ export interface Coords { }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -950,9 +935,6 @@ export interface Coords { "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -967,6 +949,6 @@ export interface Coords { ] }, "version": "FakeTSVersion", - "size": 1557 + "size": 1787 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/no-circular-import/export.js index 8037a31e3aa..3553ec1da07 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -243,7 +243,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -282,27 +282,27 @@ export declare class App { }, "./lib1/tools/tools.interface.ts": { "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -326,9 +326,6 @@ export declare class App { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -353,7 +350,7 @@ export declare class App { ] }, "version": "FakeTSVersion", - "size": 1378 + "size": 1901 } @@ -376,7 +373,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:01:50 AM] Found 1 error. Watching for file changes. +[12:01:38 AM] Found 1 error. Watching for file changes. @@ -403,10 +400,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -443,13 +440,9 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents //// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} @@ -597,9 +590,9 @@ export interface ITest { Output:: >> Screen clear -[12:01:57 AM] File change detected. Starting incremental compilation... +[12:01:45 AM] File change detected. Starting incremental compilation... -[12:02:25 AM] Found 0 errors. Watching for file changes. +[12:02:13 AM] Found 0 errors. Watching for file changes. @@ -626,10 +619,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -671,7 +664,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},"-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -718,19 +711,19 @@ export interface ITest { }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -754,9 +747,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -781,7 +771,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1544 + "size": 1901 } @@ -796,7 +786,7 @@ export interface ITest { Output:: >> Screen clear -[12:02:32 AM] File change detected. Starting incremental compilation... +[12:02:20 AM] File change detected. Starting incremental compilation... lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? @@ -804,7 +794,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:03:00 AM] Found 1 error. Watching for file changes. +[12:02:48 AM] Found 1 error. Watching for file changes. @@ -831,10 +821,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -876,7 +866,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},"-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -923,19 +913,19 @@ export interface ITest { }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -959,9 +949,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -1009,6 +996,6 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1921 + "size": 2278 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/yes-circular-import/exports.js index d858978aba4..8e8b28d62f7 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -275,7 +275,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,31 +316,31 @@ export declare class App { }, "./lib1/tools/tools.interface.ts": { "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -368,9 +368,6 @@ export declare class App { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -400,7 +397,7 @@ export declare class App { ] }, "version": "FakeTSVersion", - "size": 1563 + "size": 2264 } @@ -423,7 +420,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:02:02 AM] Found 1 error. Watching for file changes. +[12:01:47 AM] Found 1 error. Watching for file changes. @@ -452,11 +449,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data.ts (computed .d.ts) -/user/username/projects/myproject/lib2/public.ts (computed .d.ts) -/user/username/projects/myproject/app.ts (computed .d.ts) -/user/username/projects/myproject/lib2/data2.ts (computed .d.ts) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -495,15 +492,10 @@ export interface ITest { //// [/user/username/projects/myproject/lib1/tools/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/tools/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib1/public.js] file written with same contents //// [/user/username/projects/myproject/lib1/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data2.js] file written with same contents //// [/user/username/projects/myproject/lib2/data2.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/data.js] file written with same contents //// [/user/username/projects/myproject/lib2/data.d.ts] file written with same contents -//// [/user/username/projects/myproject/lib2/public.js] file written with same contents //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents -//// [/user/username/projects/myproject/app.js] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} @@ -666,9 +658,9 @@ export interface ITest { Output:: >> Screen clear -[12:02:09 AM] File change detected. Starting incremental compilation... +[12:01:54 AM] File change detected. Starting incremental compilation... -[12:02:40 AM] Found 0 errors. Watching for file changes. +[12:02:25 AM] Found 0 errors. Watching for file changes. @@ -697,11 +689,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -746,7 +738,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},"-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -795,23 +787,23 @@ export interface ITest { }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -839,9 +831,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -871,7 +860,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1729 + "size": 2264 } @@ -886,7 +875,7 @@ export interface ITest { Output:: >> Screen clear -[12:02:47 AM] File change detected. Starting incremental compilation... +[12:02:32 AM] File change detected. Starting incremental compilation... lib2/data.ts:5:13 - error TS2322: Type '{ title: string; }' is not assignable to type 'ITest'. Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'? @@ -894,7 +883,7 @@ Output:: 5 title: "title"    ~~~~~~~~~~~~~~ -[12:03:18 AM] Found 1 error. Watching for file changes. +[12:03:03 AM] Found 1 error. Watching for file changes. @@ -923,11 +912,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) /user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -972,7 +961,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},"-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1021,23 +1010,23 @@ export interface ITest { }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -1065,9 +1054,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -1120,6 +1106,6 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 2106 + "size": 2641 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js index a7fb75106e9..036a97dadd0 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js index bc663a126af..35a4b1f8042 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js index 777695e9f0d..eac80ea7253 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -102,7 +102,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -137,7 +137,7 @@ export {}; }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -152,9 +152,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -167,7 +164,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 909 + "size": 954 } @@ -211,7 +208,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -239,7 +236,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -274,7 +271,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -289,9 +286,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -316,7 +310,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1036 + "size": 1081 } @@ -355,7 +349,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -383,7 +377,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-18774426152-export class C\n{\n d: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -418,7 +412,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -433,9 +427,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -448,7 +439,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 909 + "size": 954 } @@ -492,7 +483,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -520,7 +511,7 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.d.ts","./b.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-21444928214-export class C\n{\n d2: number;\n}","-1688906387-import {C} from './c';\nexport class B\n{\n c: C;\n}",{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -555,7 +546,7 @@ exitCode:: ExitStatus.undefined }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -570,9 +561,6 @@ exitCode:: ExitStatus.undefined ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.d.ts" - ], "./b.d.ts": [ "./c.d.ts" ] @@ -597,6 +585,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1036 + "size": 1081 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js index 1790ea4fb89..e611a650ee1 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -140,7 +140,7 @@ export {}; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-22447130237-export class C\n{\n d = 1;\n}","-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -167,15 +167,15 @@ export {}; }, "./c.ts": { "version": "-22447130237-export class C\n{\n d = 1;\n}", - "signature": "-22447130237-export class C\n{\n d = 1;\n}" + "signature": "-6977846840-export declare class C {\n d: number;\n}\n" }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -190,9 +190,6 @@ export {}; ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -205,7 +202,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 908 + "size": 1141 } @@ -248,8 +245,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -295,7 +292,7 @@ export declare class C { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -326,11 +323,11 @@ export declare class C { }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -345,9 +342,6 @@ export declare class C { ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -372,7 +366,7 @@ export declare class C { ] }, "version": "FakeTSVersion", - "size": 1120 + "size": 1269 } @@ -410,8 +404,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -457,7 +451,7 @@ export declare class C { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22447130237-export class C\n{\n d = 1;\n}","signature":"-6977846840-export declare class C {\n d: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -488,11 +482,11 @@ export declare class C { }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -507,9 +501,6 @@ export declare class C { ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -522,7 +513,7 @@ export declare class C { ] }, "version": "FakeTSVersion", - "size": 992 + "size": 1141 } @@ -565,8 +556,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -612,7 +603,7 @@ export declare class C { //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);"],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-22846341163-export class C\n{\n d2 = 1;\n}","signature":"-4637923302-export declare class C {\n d2: number;\n}\n"},{"version":"-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}","signature":"-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"}],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2]],"exportedModulesMap":[[3,2]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./a.ts","start":82,"length":1,"code":2339,"category":1,"messageText":"Property 'd' does not exist on type 'C'."}]],3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -643,11 +634,11 @@ export declare class C { }, "./b.ts": { "version": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}", - "signature": "-6292386773-import {C} from './c';\nexport class B\n{\n c = new C();\n}" + "signature": "-165097315-import { C } from './c';\nexport declare class B {\n c: C;\n}\n" }, "./a.ts": { "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", - "signature": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -662,9 +653,6 @@ export declare class C { ] }, "exportedModulesMap": { - "./a.ts": [ - "./b.ts" - ], "./b.ts": [ "./c.ts" ] @@ -689,6 +677,6 @@ export declare class C { ] }, "version": "FakeTSVersion", - "size": 1120 + "size": 1269 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index caf1d30d235..ae50ce1ec81 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -199,7 +199,7 @@ import "./d"; //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -234,23 +234,23 @@ import "./d"; }, "./a.ts": { "version": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}", - "signature": "9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}" + "signature": "8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n" }, "./b.ts": { "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -277,9 +277,6 @@ import "./d"; "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -339,7 +336,7 @@ import "./d"; ] }, "version": "FakeTSVersion", - "size": 1936 + "size": 2452 } @@ -385,10 +382,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -433,7 +430,7 @@ export interface Coords { //// [/user/username/projects/myproject/d.d.ts] file written with same contents //// [/user/username/projects/myproject/e.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -472,19 +469,19 @@ export interface Coords { }, "./b.ts": { "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -511,9 +508,6 @@ export interface Coords { "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -528,7 +522,7 @@ export interface Coords { ] }, "version": "FakeTSVersion", - "size": 1436 + "size": 1787 } @@ -590,10 +584,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -638,7 +632,7 @@ export interface Coords { //// [/user/username/projects/myproject/d.d.ts] file written with same contents //// [/user/username/projects/myproject/e.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"9889814467-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}","signature":"8536297517-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x2: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,[4,[{"file":"./c.ts","start":139,"length":4,"code":2322,"category":1,"messageText":{"messageText":"Type '{ x: number; y: number; }' is not assignable to type 'Coords'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.","category":1,"code":2353}]},"relatedInformation":[{"file":"./a.ts","start":47,"length":1,"messageText":"The expected type comes from property 'c' which is declared here on type 'PointWrapper'","category":3,"code":6500}]}]],[5,[{"file":"./d.ts","start":45,"length":1,"code":2339,"category":1,"messageText":"Property 'x' does not exist on type 'Coords'."}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -677,19 +671,19 @@ export interface Coords { }, "./b.ts": { "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -716,9 +710,6 @@ export interface Coords { "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -778,7 +769,7 @@ export interface Coords { ] }, "version": "FakeTSVersion", - "size": 2101 + "size": 2452 } @@ -824,10 +815,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -872,7 +863,7 @@ export interface Coords { //// [/user/username/projects/myproject/d.d.ts] file written with same contents //// [/user/username/projects/myproject/e.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","-5185546240-import \"./d\";"],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[5,3],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts","./e.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"2103509937-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}","signature":"696351195-export interface Point {\n name: string;\n c: Coords;\n}\nexport interface Coords {\n x: number;\n y: number;\n}\n"},{"version":"-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}","signature":"-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n"},{"version":"-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};","signature":"-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n"},{"version":"-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;","signature":"-3531856636-export {};\n"},{"version":"-5185546240-import \"./d\";","signature":"-3619301366-import \"./d\";\n"}],"options":{"declaration":true},"fileIdsList":[[2],[3],[4],[5]],"referencedMap":[[3,1],[4,2],[5,3],[6,4]],"exportedModulesMap":[[3,1],[4,2],[6,4]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -911,19 +902,19 @@ export interface Coords { }, "./b.ts": { "version": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}", - "signature": "-8029610078-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}" + "signature": "-7279094804-import { Point } from \"./a\";\nexport interface PointWrapper extends Point {\n}\n" }, "./c.ts": { "version": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};", - "signature": "-37232372138-import { PointWrapper } from \"./b\";\nexport function getPoint(): PointWrapper {\n return {\n name: \"test\",\n c: {\n x: 1,\n y: 2\n }\n }\n};" + "signature": "-3387333988-import { PointWrapper } from \"./b\";\nexport declare function getPoint(): PointWrapper;\n" }, "./d.ts": { "version": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;", - "signature": "-17875457076-import { getPoint } from \"./c\";\ngetPoint().c.x;" + "signature": "-3531856636-export {};\n" }, "./e.ts": { "version": "-5185546240-import \"./d\";", - "signature": "-5185546240-import \"./d\";" + "signature": "-3619301366-import \"./d\";\n" } }, "options": { @@ -950,9 +941,6 @@ export interface Coords { "./c.ts": [ "./b.ts" ], - "./d.ts": [ - "./c.ts" - ], "./e.ts": [ "./d.ts" ] @@ -967,6 +955,6 @@ export interface Coords { ] }, "version": "FakeTSVersion", - "size": 1436 + "size": 1787 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/no-circular-import/export.js index ffa7cb905e4..ab19e60075c 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -243,7 +243,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -282,27 +282,27 @@ export declare class App { }, "./lib1/tools/tools.interface.ts": { "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -326,9 +326,6 @@ export declare class App { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -353,7 +350,7 @@ export declare class App { ] }, "version": "FakeTSVersion", - "size": 1378 + "size": 1901 } @@ -402,11 +399,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -447,7 +444,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -490,23 +487,23 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -530,9 +527,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -580,7 +574,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1843 + "size": 2278 } @@ -623,11 +617,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -668,7 +662,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,5,6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -711,23 +705,23 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -751,9 +745,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -778,7 +769,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1466 + "size": 1901 } @@ -827,11 +818,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -872,7 +863,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[6],[3],[2],[4],[5]],"referencedMap":[[7,1],[4,2],[3,3],[5,4],[6,5]],"exportedModulesMap":[[4,2],[3,3],[5,4],[6,5]],"semanticDiagnosticsPerFile":[1,7,4,3,2,[5,[{"file":"./lib2/data.ts","start":121,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],6]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -915,23 +906,23 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data.ts": { "version": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-30573389178-import { ITest } from \"lib1/public\";\nexport class Data {\n public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-15758516261-import { ITest } from \"lib1/public\";\nexport declare class Data {\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -955,9 +946,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -1005,6 +993,6 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1843 + "size": 2278 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js index 66f43221dcb..65720509b7e 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -275,7 +275,7 @@ export declare class App { //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-4369626085-export interface ITest {\n title: string;\n}","-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -316,31 +316,31 @@ export declare class App { }, "./lib1/tools/tools.interface.ts": { "version": "-4369626085-export interface ITest {\n title: string;\n}", - "signature": "-4369626085-export interface ITest {\n title: string;\n}" + "signature": "-2463740027-export interface ITest {\n title: string;\n}\n" }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -368,9 +368,6 @@ export declare class App { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -400,7 +397,7 @@ export declare class App { ] }, "version": "FakeTSVersion", - "size": 1563 + "size": 2264 } @@ -451,12 +448,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -500,7 +497,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -545,27 +542,27 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -593,9 +590,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -648,7 +642,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 2028 + "size": 2641 } @@ -693,12 +687,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -742,7 +736,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-4369626085-export interface ITest {\n title: string;\n}","signature":"-2463740027-export interface ITest {\n title: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,6,5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -787,27 +781,27 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -835,9 +829,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -867,7 +858,7 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 1651 + "size": 2264 } @@ -918,12 +909,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -967,7 +958,7 @@ export interface ITest { //// [/user/username/projects/myproject/lib2/public.d.ts] file written with same contents //// [/user/username/projects/myproject/app.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},"-13301115055-export * from \"./tools.interface\";","-5078933600-export * from \"./tools/public\";","-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","-9530042629-export * from \"./data\";","-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}"],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./lib1/tools/tools.interface.ts","./lib1/tools/public.ts","./lib1/public.ts","./lib2/data2.ts","./lib2/data.ts","./lib2/public.ts","./app.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3501597171-export interface ITest {\n title2: string;\n}","signature":"-3883556937-export interface ITest {\n title2: string;\n}\n"},{"version":"-13301115055-export * from \"./tools.interface\";","signature":"-13735034501-export * from \"./tools.interface\";\n"},{"version":"-5078933600-export * from \"./tools/public\";","signature":"-4396051542-export * from \"./tools/public\";\n"},{"version":"-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}","signature":"-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n"},{"version":"-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}","signature":"-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n"},{"version":"-9530042629-export * from \"./data\";","signature":"-9548728731-export * from \"./data\";\n"},{"version":"-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}","signature":"-18990360330-export declare class App {\n constructor();\n}\n"}],"options":{"declaration":true},"fileIdsList":[[7],[3],[2],[4,5],[6]],"referencedMap":[[8,1],[4,2],[3,3],[6,4],[5,5],[7,5]],"exportedModulesMap":[[4,2],[3,3],[6,4],[5,5],[7,5]],"semanticDiagnosticsPerFile":[1,8,4,3,2,[6,[{"file":"./lib2/data.ts","start":174,"length":14,"code":2322,"category":1,"messageText":{"messageText":"Type '{ title: string; }' is not assignable to type 'ITest'.","category":1,"code":2322,"next":[{"messageText":"Object literal may only specify known properties, but 'title' does not exist in type 'ITest'. Did you mean to write 'title2'?","category":1,"code":2561}]}}]],5,7]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1012,27 +1003,27 @@ export interface ITest { }, "./lib1/tools/public.ts": { "version": "-13301115055-export * from \"./tools.interface\";", - "signature": "-13301115055-export * from \"./tools.interface\";" + "signature": "-13735034501-export * from \"./tools.interface\";\n" }, "./lib1/public.ts": { "version": "-5078933600-export * from \"./tools/public\";", - "signature": "-5078933600-export * from \"./tools/public\";" + "signature": "-4396051542-export * from \"./tools/public\";\n" }, "./lib2/data2.ts": { "version": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}", - "signature": "-11055285700-import { Data } from \"./data\";\nexport class Data2 {\n public dat?: Data;\n}" + "signature": "-17387821545-import { Data } from \"./data\";\nexport declare class Data2 {\n dat?: Data;\n}\n" }, "./lib2/data.ts": { "version": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}", - "signature": "-2056074887-import { ITest } from \"lib1/public\"; import { Data2 } from \"./data2\";\nexport class Data {\n public dat?: Data2; public test() {\n const result: ITest = {\n title: \"title\"\n }\n return result;\n }\n}" + "signature": "-14170088573-import { ITest } from \"lib1/public\";\nimport { Data2 } from \"./data2\";\nexport declare class Data {\n dat?: Data2;\n test(): ITest;\n}\n" }, "./lib2/public.ts": { "version": "-9530042629-export * from \"./data\";", - "signature": "-9530042629-export * from \"./data\";" + "signature": "-9548728731-export * from \"./data\";\n" }, "./app.ts": { "version": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}", - "signature": "-14937286564-import { Data } from \"lib2/public\";\nexport class App {\n public constructor() {\n new Data().test();\n }\n}" + "signature": "-18990360330-export declare class App {\n constructor();\n}\n" } }, "options": { @@ -1060,9 +1051,6 @@ export interface ITest { ] }, "exportedModulesMap": { - "./app.ts": [ - "./lib2/public.ts" - ], "./lib1/public.ts": [ "./lib1/tools/public.ts" ], @@ -1115,6 +1103,6 @@ export interface ITest { ] }, "version": "FakeTSVersion", - "size": 2028 + "size": 2641 } diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js index 7b7d97027af..b320338ade2 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js index 0944f16a316..e4a2935993f 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js index d840a16490c..07ddff950d9 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.d.ts-change.js @@ -63,7 +63,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -142,7 +142,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -205,7 +205,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -273,7 +273,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.d.ts (used version) /user/username/projects/myproject/b.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js index 13a8032b7e8..68a41566c5e 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/deepImportChanges/errors-for-.ts-change.js @@ -61,9 +61,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -179,8 +179,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -260,8 +260,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -346,8 +346,8 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/a.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js index d10479ad0f6..54fdd1b5eba 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js @@ -96,11 +96,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -241,10 +241,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -347,10 +347,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -437,10 +437,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (used version) -/user/username/projects/myproject/c.ts (used version) -/user/username/projects/myproject/d.ts (used version) -/user/username/projects/myproject/e.ts (used version) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) +/user/username/projects/myproject/c.ts (computed .d.ts during emit) +/user/username/projects/myproject/d.ts (computed .d.ts during emit) +/user/username/projects/myproject/e.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/no-circular-import/export.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/no-circular-import/export.js index 41fd01aac5d..91452c7142d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/no-circular-import/export.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/no-circular-import/export.js @@ -81,12 +81,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -288,11 +288,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -372,11 +372,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -462,11 +462,11 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js index 2ceed7c682f..058f6fe2036 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/transitive-exports/yes-circular-import/exports.js @@ -89,13 +89,13 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/myproject/lib1/tools/tools.interface.ts (used version) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -322,12 +322,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -412,12 +412,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: @@ -508,12 +508,12 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/lib1/tools/tools.interface.ts (computed .d.ts) -/user/username/projects/myproject/lib1/tools/public.ts (used version) -/user/username/projects/myproject/lib1/public.ts (used version) -/user/username/projects/myproject/lib2/data.ts (used version) -/user/username/projects/myproject/lib2/data2.ts (used version) -/user/username/projects/myproject/lib2/public.ts (used version) -/user/username/projects/myproject/app.ts (used version) +/user/username/projects/myproject/lib1/tools/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib1/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/public.ts (computed .d.ts during emit) +/user/username/projects/myproject/app.ts (computed .d.ts during emit) +/user/username/projects/myproject/lib2/data2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js index b1af51bc769..83a5707d251 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -277,7 +277,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -301,7 +301,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", @@ -309,7 +309,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -331,7 +331,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1066 + "size": 1200 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -427,7 +427,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -451,7 +451,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", @@ -459,7 +459,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -499,7 +499,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1229 + "size": 1363 } @@ -611,7 +611,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9621097780-export interface A {\r\n name: string;\r\n}",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"11373096570-console.log(\"hi\");\r\nexport { }"],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n"},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n"}],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -635,7 +635,7 @@ exitCode:: ExitStatus.undefined }, "../shared/types/db.ts": { "version": "-9621097780-export interface A {\r\n name: string;\r\n}", - "signature": "-9621097780-export interface A {\r\n name: string;\r\n}" + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", @@ -643,7 +643,7 @@ exitCode:: ExitStatus.undefined }, "../src/other.ts": { "version": "11373096570-console.log(\"hi\");\r\nexport { }", - "signature": "11373096570-console.log(\"hi\");\r\nexport { }" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -665,7 +665,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1057 + "size": 1191 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index 841002b4400..6eea8b4b620 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -173,8 +173,8 @@ Program files:: No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/user/username/projects/myproject/file1.ts (used version) -/user/username/projects/myproject/src/file2.ts (used version) +/user/username/projects/myproject/file1.ts (computed .d.ts during emit) +/user/username/projects/myproject/src/file2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 7e2380200d7..aaa8113e67d 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -173,8 +173,8 @@ Program files:: No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/user/username/projects/myproject/file1.ts (used version) -/user/username/projects/myproject/src/file2.ts (used version) +/user/username/projects/myproject/file1.ts (computed .d.ts during emit) +/user/username/projects/myproject/src/file2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js index d17968fa60d..e7e009453d8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js @@ -173,8 +173,8 @@ Program files:: No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/user/username/projects/myproject/file1.ts (used version) -/user/username/projects/myproject/src/file2.ts (used version) +/user/username/projects/myproject/file1.ts (computed .d.ts during emit) +/user/username/projects/myproject/src/file2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js index e24e1ba0986..c1884b9430b 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js @@ -74,7 +74,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/projects/project1/class1.d.ts (used version) -/user/username/projects/myproject/projects/project2/class2.ts (used version) +/user/username/projects/myproject/projects/project2/class2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/projects/project2/tsconfig.json: @@ -118,7 +118,7 @@ declare class class2 { //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -141,7 +141,7 @@ declare class class2 { }, "./class2.ts": { "version": "777969115-class class2 {}", - "signature": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", "affectsGlobalScope": true } }, @@ -156,7 +156,7 @@ declare class class2 { ] }, "version": "FakeTSVersion", - "size": 760 + "size": 814 } diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js index 9d72767e1d5..61b51a6589a 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js @@ -121,7 +121,55 @@ export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-2676574883-export const World = \"hello\";\r\n","-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n",{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1355 +} //// [/user/username/projects/sample1/logic/index.js.map] {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} @@ -146,7 +194,72 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1472 +} //// [/user/username/projects/sample1/tests/index.js] "use strict"; @@ -166,15 +279,93 @@ export declare const m: typeof mod; //// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n"],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5]},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1617 +} /a/lib/tsc.js -w -p tests Output:: >> Screen clear -[12:01:07 AM] Starting compilation in watch mode... +[12:01:13 AM] Starting compilation in watch mode... -[12:01:08 AM] Found 0 errors. Watching for file changes. +[12:01:14 AM] Found 0 errors. Watching for file changes. @@ -278,12 +469,77 @@ function foo() { } //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-4111660551-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-4111660551-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1490 +} + Output:: >> Screen clear -[12:01:23 AM] File change detected. Starting incremental compilation... +[12:01:32 AM] File change detected. Starting incremental compilation... -[12:01:24 AM] Found 0 errors. Watching for file changes. +[12:01:33 AM] Found 0 errors. Watching for file changes. @@ -395,12 +651,77 @@ export declare function gfoo(): void; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-380817803-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }export function gfoo() { }","signature":"-11367551051-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function gfoo(): void;\n"}],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-380817803-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }export function gfoo() { }", + "signature": "-11367551051-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function gfoo(): void;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1555 +} + Output:: >> Screen clear -[12:01:39 AM] File change detected. Starting incremental compilation... +[12:01:51 AM] File change detected. Starting incremental compilation... -[12:01:49 AM] Found 0 errors. Watching for file changes. +[12:02:01 AM] Found 0 errors. Watching for file changes. @@ -583,6 +904,70 @@ exports.gfoo = gfoo; //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"-380817803-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }export function gfoo() { }","signature":"-11367551051-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function gfoo(): void;\n"}],"options":{"composite":true,"declaration":true,"declarationDir":"./decls"},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "-9047123202-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map" + }, + "../core/anothermodule.d.ts": { + "version": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "-4454971016-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map" + }, + "./index.ts": { + "version": "-380817803-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\nfunction foo() { }export function gfoo() { }", + "signature": "-11367551051-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function gfoo(): void;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationDir": "./decls" + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1538 +} + //// [/user/username/projects/sample1/logic/decls/index.d.ts] export declare function getSecondsInDay(): number; import * as mod from '../core/anotherModule'; @@ -593,9 +978,9 @@ export declare function gfoo(): void; Output:: >> Screen clear -[12:02:06 AM] File change detected. Starting incremental compilation... +[12:02:22 AM] File change detected. Starting incremental compilation... -[12:02:16 AM] Found 0 errors. Watching for file changes. +[12:02:32 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js index 487031a8879..6cd4f1cec3e 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js @@ -57,7 +57,39 @@ export declare class A { //// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7264743946-export class A {}"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-7264743946-export class A {}","signature":"-8728835846-export declare class A {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./index.ts": { + "version": "-7264743946-export class A {}", + "signature": "-8728835846-export declare class A {\n}\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 718 +} //// [/user/username/projects/transitiveReferences/b/index.js] "use strict"; @@ -73,7 +105,58 @@ export declare const b: A; //// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n","-2591036212-import {A} from '@ref/a';\nexport const b = new A();"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-2591036212-import {A} from '@ref/a';\nexport const b = new A();","signature":"-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../a/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../a/index.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./index.ts": { + "version": "-2591036212-import {A} from '@ref/a';\nexport const b = new A();", + "signature": "-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 875 +} //// [/user/username/projects/transitiveReferences/c/index.js] "use strict"; @@ -88,9 +171,9 @@ a_1.X; /a/lib/tsc.js -w -p c Output:: >> Screen clear -[12:00:53 AM] Starting compilation in watch mode... +[12:00:57 AM] Starting compilation in watch mode... -[12:00:57 AM] Found 0 errors. Watching for file changes. +[12:01:01 AM] Found 0 errors. Watching for file changes. @@ -210,12 +293,63 @@ export declare function gfoo(): void; //// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }","signature":"4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../a/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../a/index.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./index.ts": { + "version": "1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }", + "signature": "4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 938 +} + Output:: >> Screen clear -[12:01:09 AM] File change detected. Starting incremental compilation... +[12:01:16 AM] File change detected. Starting incremental compilation... -[12:01:13 AM] Found 0 errors. Watching for file changes. +[12:01:20 AM] Found 0 errors. Watching for file changes. @@ -313,9 +447,9 @@ export class A {} Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:28 AM] File change detected. Starting incremental compilation... -[12:01:25 AM] Found 0 errors. Watching for file changes. +[12:01:32 AM] Found 0 errors. Watching for file changes. @@ -412,9 +546,9 @@ Input:: Output:: >> Screen clear -[12:01:29 AM] File change detected. Starting incremental compilation... +[12:01:36 AM] File change detected. Starting incremental compilation... -[12:01:33 AM] Found 0 errors. Watching for file changes. +[12:01:40 AM] Found 0 errors. Watching for file changes. @@ -511,9 +645,9 @@ Input:: Output:: >> Screen clear -[12:01:37 AM] File change detected. Starting incremental compilation... +[12:01:44 AM] File change detected. Starting incremental compilation... -[12:01:38 AM] Found 0 errors. Watching for file changes. +[12:01:45 AM] Found 0 errors. Watching for file changes. @@ -606,9 +740,9 @@ Input:: Output:: >> Screen clear -[12:01:42 AM] File change detected. Starting incremental compilation... +[12:01:49 AM] File change detected. Starting incremental compilation... -[12:01:43 AM] Found 0 errors. Watching for file changes. +[12:01:50 AM] Found 0 errors. Watching for file changes. @@ -688,14 +822,14 @@ Input:: Output:: >> Screen clear -[12:01:45 AM] File change detected. Starting incremental compilation... +[12:01:52 AM] File change detected. Starting incremental compilation... c/tsconfig.json:1:84 - error TS6053: File '/user/username/projects/transitiveReferences/b' not found. 1 {"compilerOptions":{"baseUrl":"./","paths":{"@ref/*":["../refs/*"]}},"references":[{"path":"../b"}]}    ~~~~~~~~~~~~~~~ -[12:01:52 AM] Found 1 error. Watching for file changes. +[12:01:59 AM] Found 1 error. Watching for file changes. @@ -776,9 +910,9 @@ Input:: Output:: >> Screen clear -[12:01:55 AM] File change detected. Starting incremental compilation... +[12:02:02 AM] File change detected. Starting incremental compilation... -[12:01:59 AM] Found 0 errors. Watching for file changes. +[12:02:06 AM] Found 0 errors. Watching for file changes. @@ -873,14 +1007,14 @@ Input:: Output:: >> Screen clear -[12:02:01 AM] File change detected. Starting incremental compilation... +[12:02:08 AM] File change detected. Starting incremental compilation... b/tsconfig.json:1:96 - error TS6053: File '/user/username/projects/transitiveReferences/a' not found. 1 {"compilerOptions":{"composite":true,"baseUrl":"./","paths":{"@ref/*":["../*"]}},"references":[{"path":"../a"}]}    ~~~~~~~~~~~~~~~ -[12:02:05 AM] Found 1 error. Watching for file changes. +[12:02:12 AM] Found 1 error. Watching for file changes. @@ -972,9 +1106,9 @@ Input:: Output:: >> Screen clear -[12:02:08 AM] File change detected. Starting incremental compilation... +[12:02:15 AM] File change detected. Starting incremental compilation... -[12:02:09 AM] Found 0 errors. Watching for file changes. +[12:02:16 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js index 2ed2f16e11f..317f977848d 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js @@ -57,7 +57,39 @@ export declare class A { //// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7264743946-export class A {}"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-7264743946-export class A {}","signature":"-8728835846-export declare class A {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./index.ts": { + "version": "-7264743946-export class A {}", + "signature": "-8728835846-export declare class A {\n}\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 718 +} //// [/user/username/projects/transitiveReferences/b/index.js] "use strict"; @@ -73,7 +105,58 @@ export declare const b: A; //// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n","-2591036212-import {A} from '@ref/a';\nexport const b = new A();"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-2591036212-import {A} from '@ref/a';\nexport const b = new A();","signature":"-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../a/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../a/index.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./index.ts": { + "version": "-2591036212-import {A} from '@ref/a';\nexport const b = new A();", + "signature": "-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 875 +} //// [/user/username/projects/transitiveReferences/c/index.js] "use strict"; @@ -88,9 +171,9 @@ a_1.X; /a/lib/tsc.js -w -p c Output:: >> Screen clear -[12:00:53 AM] Starting compilation in watch mode... +[12:00:57 AM] Starting compilation in watch mode... -[12:00:57 AM] Found 0 errors. Watching for file changes. +[12:01:01 AM] Found 0 errors. Watching for file changes. @@ -206,12 +289,63 @@ export declare function gfoo(): void; //// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }","signature":"4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../a/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../a/index.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./index.ts": { + "version": "1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }", + "signature": "4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../a/index.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../a/index.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 938 +} + Output:: >> Screen clear -[12:01:09 AM] File change detected. Starting incremental compilation... +[12:01:16 AM] File change detected. Starting incremental compilation... -[12:01:13 AM] Found 0 errors. Watching for file changes. +[12:01:20 AM] Found 0 errors. Watching for file changes. @@ -305,9 +439,9 @@ export class A {} Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:28 AM] File change detected. Starting incremental compilation... -[12:01:25 AM] Found 0 errors. Watching for file changes. +[12:01:32 AM] Found 0 errors. Watching for file changes. @@ -400,9 +534,9 @@ Input:: Output:: >> Screen clear -[12:01:29 AM] File change detected. Starting incremental compilation... +[12:01:36 AM] File change detected. Starting incremental compilation... -[12:01:33 AM] Found 0 errors. Watching for file changes. +[12:01:40 AM] Found 0 errors. Watching for file changes. @@ -495,9 +629,9 @@ Input:: Output:: >> Screen clear -[12:01:37 AM] File change detected. Starting incremental compilation... +[12:01:44 AM] File change detected. Starting incremental compilation... -[12:01:38 AM] Found 0 errors. Watching for file changes. +[12:01:45 AM] Found 0 errors. Watching for file changes. @@ -585,9 +719,9 @@ Input:: Output:: >> Screen clear -[12:01:42 AM] File change detected. Starting incremental compilation... +[12:01:49 AM] File change detected. Starting incremental compilation... -[12:01:43 AM] Found 0 errors. Watching for file changes. +[12:01:50 AM] Found 0 errors. Watching for file changes. @@ -662,14 +796,14 @@ Input:: Output:: >> Screen clear -[12:01:45 AM] File change detected. Starting incremental compilation... +[12:01:52 AM] File change detected. Starting incremental compilation... c/tsconfig.json:1:105 - error TS6053: File '/user/username/projects/transitiveReferences/b' not found. 1 {"compilerOptions":{"baseUrl":"./","paths":{"@ref/*":["../refs/*"]}},"files":["index.ts"],"references":[{"path":"../b"}]}    ~~~~~~~~~~~~~~~ -[12:01:52 AM] Found 1 error. Watching for file changes. +[12:01:59 AM] Found 1 error. Watching for file changes. @@ -748,9 +882,9 @@ Input:: Output:: >> Screen clear -[12:01:55 AM] File change detected. Starting incremental compilation... +[12:02:02 AM] File change detected. Starting incremental compilation... -[12:01:59 AM] Found 0 errors. Watching for file changes. +[12:02:06 AM] Found 0 errors. Watching for file changes. @@ -841,14 +975,14 @@ Input:: Output:: >> Screen clear -[12:02:01 AM] File change detected. Starting incremental compilation... +[12:02:08 AM] File change detected. Starting incremental compilation... b/tsconfig.json:1:117 - error TS6053: File '/user/username/projects/transitiveReferences/a' not found. 1 {"compilerOptions":{"composite":true,"baseUrl":"./","paths":{"@ref/*":["../*"]}},"files":["index.ts"],"references":[{"path":"../a"}]}    ~~~~~~~~~~~~~~~ -[12:02:05 AM] Found 1 error. Watching for file changes. +[12:02:12 AM] Found 1 error. Watching for file changes. @@ -937,9 +1071,9 @@ Input:: Output:: >> Screen clear -[12:02:08 AM] File change detected. Starting incremental compilation... +[12:02:15 AM] File change detected. Starting incremental compilation... -[12:02:09 AM] Found 0 errors. Watching for file changes. +[12:02:16 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js index 054505de5ec..1ff6e1dd598 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js @@ -81,7 +81,39 @@ export declare class A { //// [/user/username/projects/transitiveReferences/tsconfig.a.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8566332115-export class A {}\r\n"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8566332115-export class A {}\r\n","signature":"-8728835846-export declare class A {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/tsconfig.a.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts" + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-8566332115-export class A {}\r\n", + "signature": "-8728835846-export declare class A {\n}\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts" + ] + }, + "version": "FakeTSVersion", + "size": 715 +} //// [/user/username/projects/transitiveReferences/b.js] "use strict"; @@ -97,7 +129,58 @@ export declare const b: A; //// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n","-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n","signature":"-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ], + "fileNamesList": [ + [ + "./a.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./b.ts": { + "version": "-13104686224-import {A} from '@ref/a';\r\nexport const b = new A();\r\n", + "signature": "-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "exportedModulesMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 868 +} //// [/user/username/projects/transitiveReferences/c.js] "use strict"; @@ -112,9 +195,9 @@ a_1.X; /a/lib/tsc.js -w -p tsconfig.c.json Output:: >> Screen clear -[12:00:47 AM] Starting compilation in watch mode... +[12:00:51 AM] Starting compilation in watch mode... -[12:00:51 AM] Found 0 errors. Watching for file changes. +[12:00:55 AM] Found 0 errors. Watching for file changes. @@ -219,12 +302,63 @@ export declare function gfoo(): void; //// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo] {"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-23418138964-import {A} from '@ref/a';\r\nexport const b = new A();\r\nexport function gfoo() { }","signature":"4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +//// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ], + "fileNamesList": [ + [ + "./a.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./b.ts": { + "version": "-23418138964-import {A} from '@ref/a';\r\nexport const b = new A();\r\nexport function gfoo() { }", + "signature": "4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "exportedModulesMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 932 +} + Output:: >> Screen clear -[12:01:03 AM] File change detected. Starting incremental compilation... +[12:01:10 AM] File change detected. Starting incremental compilation... -[12:01:07 AM] Found 0 errors. Watching for file changes. +[12:01:14 AM] Found 0 errors. Watching for file changes. @@ -310,9 +444,9 @@ export class A {} Output:: >> Screen clear -[12:01:15 AM] File change detected. Starting incremental compilation... +[12:01:22 AM] File change detected. Starting incremental compilation... -[12:01:19 AM] Found 0 errors. Watching for file changes. +[12:01:26 AM] Found 0 errors. Watching for file changes. @@ -393,9 +527,9 @@ Input:: Output:: >> Screen clear -[12:01:23 AM] File change detected. Starting incremental compilation... +[12:01:30 AM] File change detected. Starting incremental compilation... -[12:01:27 AM] Found 0 errors. Watching for file changes. +[12:01:34 AM] Found 0 errors. Watching for file changes. @@ -476,9 +610,9 @@ Input:: Output:: >> Screen clear -[12:01:31 AM] File change detected. Starting incremental compilation... +[12:01:38 AM] File change detected. Starting incremental compilation... -[12:01:32 AM] Found 0 errors. Watching for file changes. +[12:01:39 AM] Found 0 errors. Watching for file changes. @@ -560,9 +694,9 @@ Input:: Output:: >> Screen clear -[12:01:36 AM] File change detected. Starting incremental compilation... +[12:01:43 AM] File change detected. Starting incremental compilation... -[12:01:37 AM] Found 0 errors. Watching for file changes. +[12:01:44 AM] Found 0 errors. Watching for file changes. @@ -631,14 +765,14 @@ Input:: Output:: >> Screen clear -[12:01:39 AM] File change detected. Starting incremental compilation... +[12:01:46 AM] File change detected. Starting incremental compilation... tsconfig.c.json:1:100 - error TS6053: File '/user/username/projects/transitiveReferences/tsconfig.b.json' not found. 1 {"files":["c.ts"],"compilerOptions":{"baseUrl":"./","paths":{"@ref/*":["./refs/*"]}},"references":[{"path":"tsconfig.b.json"}]}    ~~~~~~~~~~~~~~~~~~~~~~~~~~ -[12:01:46 AM] Found 1 error. Watching for file changes. +[12:01:53 AM] Found 1 error. Watching for file changes. @@ -722,9 +856,9 @@ Input:: Output:: >> Screen clear -[12:01:49 AM] File change detected. Starting incremental compilation... +[12:01:56 AM] File change detected. Starting incremental compilation... -[12:01:53 AM] Found 0 errors. Watching for file changes. +[12:02:00 AM] Found 0 errors. Watching for file changes. @@ -805,14 +939,14 @@ Input:: Output:: >> Screen clear -[12:01:55 AM] File change detected. Starting incremental compilation... +[12:02:02 AM] File change detected. Starting incremental compilation... tsconfig.b.json:10:21 - error TS6053: File '/user/username/projects/transitiveReferences/tsconfig.a.json' not found. 10 "references": [ { "path": "tsconfig.a.json" } ]    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[12:01:59 AM] Found 1 error. Watching for file changes. +[12:02:06 AM] Found 1 error. Watching for file changes. @@ -894,9 +1028,9 @@ Input:: Output:: >> Screen clear -[12:02:02 AM] File change detected. Starting incremental compilation... +[12:02:09 AM] File change detected. Starting incremental compilation... -[12:02:03 AM] Found 0 errors. Watching for file changes. +[12:02:10 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js b/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js index cbba73be6b5..4d3501b96fe 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js @@ -68,7 +68,39 @@ export declare class A { //// [/user/username/projects/transitiveReferences/tsconfig.a.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8566332115-export class A {}\r\n"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8566332115-export class A {}\r\n","signature":"-8728835846-export declare class A {\n}\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/tsconfig.a.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts" + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-8566332115-export class A {}\r\n", + "signature": "-8728835846-export declare class A {\n}\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts" + ] + }, + "version": "FakeTSVersion", + "size": 715 +} //// [/user/username/projects/transitiveReferences/b.js] "use strict"; @@ -84,7 +116,58 @@ export declare const b: A; //// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n","-19869990292-import {A} from \"a\";export const b = new A();"],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.d.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-19869990292-import {A} from \"a\";export const b = new A();","signature":"1870369234-import { A } from \"a\";\nexport declare const b: A;\n"}],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ], + "fileNamesList": [ + [ + "./a.d.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./a.d.ts": { + "version": "-8728835846-export declare class A {\n}\n", + "signature": "-8728835846-export declare class A {\n}\n" + }, + "./b.ts": { + "version": "-19869990292-import {A} from \"a\";export const b = new A();", + "signature": "1870369234-import { A } from \"a\";\nexport declare const b: A;\n" + } + }, + "options": { + "composite": true + }, + "referencedMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "exportedModulesMap": { + "./b.ts": [ + "./a.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.d.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 853 +} //// [/user/username/projects/transitiveReferences/c.js] "use strict"; @@ -99,9 +182,9 @@ a_1.X; /a/lib/tsc.js -w -p tsconfig.c.json Output:: >> Screen clear -[12:00:47 AM] Starting compilation in watch mode... +[12:00:51 AM] Starting compilation in watch mode... -[12:00:51 AM] Found 0 errors. Watching for file changes. +[12:00:55 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-when-solution-is-already-built.js index 665b7cbac06..dfcb553d113 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function foo(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"1045484683-export function bar() { }","4646078106-export function foo() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/bar.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 909 +} //// [/user/username/projects/myproject/packages/A/lib/index.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/index.d.ts","../b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/index.d.ts","../b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts", + "./src/index.ts" + ], + "fileNamesList": [ + [ + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../b/lib/index.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../b/lib/bar.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/index.ts": [ + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/index.ts", + "../b/lib/bar.d.ts", + "../b/lib/index.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 980 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:05 AM] Starting compilation in watch mode... +[12:01:09 AM] Starting compilation in watch mode... -[12:01:15 AM] Found 0 errors. Watching for file changes. +[12:01:19 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks-when-solution-is-already-built.js index 5ad338edf8d..8d9938e3c2f 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function foo(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"1045484683-export function bar() { }","4646078106-export function foo() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/bar.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 909 +} //// [/user/username/projects/myproject/packages/A/lib/index.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/b/lib/index.d.ts","../../node_modules/b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/b/lib/index.d.ts","../../node_modules/b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/b/lib/index.d.ts", + "../../node_modules/b/lib/bar.d.ts", + "./src/index.ts" + ], + "fileNamesList": [ + [ + "../../node_modules/b/lib/index.d.ts", + "../../node_modules/b/lib/bar.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../../node_modules/b/lib/index.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../../node_modules/b/lib/bar.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/index.ts": [ + "../../node_modules/b/lib/index.d.ts", + "../../node_modules/b/lib/bar.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/b/lib/bar.d.ts", + "../../node_modules/b/lib/index.d.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1012 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:05 AM] Starting compilation in watch mode... +[12:01:09 AM] Starting compilation in watch mode... -[12:01:15 AM] Found 0 errors. Watching for file changes. +[12:01:19 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks.js index 203755bc3fd..e33dc889abe 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-preserveSymlinks.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/index.ts (used version) /user/username/projects/myproject/packages/b/src/bar.ts (used version) -/user/username/projects/myproject/packages/a/src/index.ts (used version) +/user/username/projects/myproject/packages/a/src/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -121,7 +121,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -154,7 +154,7 @@ export {}; }, "./src/index.ts": { "version": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n", - "signature": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -168,12 +168,7 @@ export {}; "../b/src/bar.ts" ] }, - "exportedModulesMap": { - "./src/index.ts": [ - "../b/src/index.ts", - "../b/src/bar.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/index.ts", @@ -182,6 +177,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 902 + "size": 948 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-when-solution-is-already-built.js index 403b35aa392..1fa905db820 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function foo(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"1045484683-export function bar() { }","4646078106-export function foo() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/bar.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 909 +} //// [/user/username/projects/myproject/packages/A/lib/index.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/index.d.ts","../b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/index.d.ts","../b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts", + "./src/index.ts" + ], + "fileNamesList": [ + [ + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../b/lib/index.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../b/lib/bar.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/index.ts": [ + "../b/lib/index.d.ts", + "../b/lib/bar.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/index.ts", + "../b/lib/bar.d.ts", + "../b/lib/index.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 994 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:07 AM] Starting compilation in watch mode... +[12:01:11 AM] Starting compilation in watch mode... -[12:01:17 AM] Found 0 errors. Watching for file changes. +[12:01:21 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js index 2aeceebba0e..ea4d108d802 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function foo(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"1045484683-export function bar() { }","4646078106-export function foo() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/bar.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 909 +} //// [/user/username/projects/myproject/packages/A/lib/index.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/@issue/b/lib/index.d.ts","../../node_modules/@issue/b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/@issue/b/lib/index.d.ts","../../node_modules/@issue/b/lib/bar.d.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/@issue/b/lib/index.d.ts", + "../../node_modules/@issue/b/lib/bar.d.ts", + "./src/index.ts" + ], + "fileNamesList": [ + [ + "../../node_modules/@issue/b/lib/index.d.ts", + "../../node_modules/@issue/b/lib/bar.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../../node_modules/@issue/b/lib/index.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../../node_modules/@issue/b/lib/bar.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/index.ts": { + "version": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/index.ts": [ + "../../node_modules/@issue/b/lib/index.d.ts", + "../../node_modules/@issue/b/lib/bar.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/@issue/b/lib/bar.d.ts", + "../../node_modules/@issue/b/lib/index.d.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1040 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:07 AM] Starting compilation in watch mode... +[12:01:11 AM] Starting compilation in watch mode... -[12:01:17 AM] Found 0 errors. Watching for file changes. +[12:01:21 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks.js index 3e4cd0265c0..ca06367e52e 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package-with-preserveSymlinks.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/index.ts (used version) /user/username/projects/myproject/packages/b/src/bar.ts (used version) -/user/username/projects/myproject/packages/a/src/index.ts (used version) +/user/username/projects/myproject/packages/a/src/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -121,7 +121,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -154,7 +154,7 @@ export {}; }, "./src/index.ts": { "version": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n", - "signature": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -168,12 +168,7 @@ export {}; "../b/src/bar.ts" ] }, - "exportedModulesMap": { - "./src/index.ts": [ - "../b/src/index.ts", - "../b/src/bar.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/index.ts", @@ -182,6 +177,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 916 + "size": 962 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package.js index 4676094b37d..b4fc0c61f64 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field-with-scoped-package.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/index.ts (used version) /user/username/projects/myproject/packages/b/src/bar.ts (used version) -/user/username/projects/myproject/packages/a/src/index.ts (used version) +/user/username/projects/myproject/packages/a/src/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -121,7 +121,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -154,7 +154,7 @@ export {}; }, "./src/index.ts": { "version": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n", - "signature": "8545527381-import { foo } from '@issue/b';\nimport { bar } from '@issue/b/lib/bar';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -168,12 +168,7 @@ export {}; "../b/src/bar.ts" ] }, - "exportedModulesMap": { - "./src/index.ts": [ - "../b/src/index.ts", - "../b/src/bar.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/index.ts", @@ -182,6 +177,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 916 + "size": 962 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field.js index 35c1e9ff979..17f7653b71c 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-packageJson-has-types-field.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/index.ts (used version) /user/username/projects/myproject/packages/b/src/bar.ts (used version) -/user/username/projects/myproject/packages/a/src/index.ts (used version) +/user/username/projects/myproject/packages/a/src/index.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -121,7 +121,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/index.ts","../b/src/bar.ts","./src/index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -154,7 +154,7 @@ export {}; }, "./src/index.ts": { "version": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n", - "signature": "3563314629-import { foo } from 'b';\nimport { bar } from 'b/lib/bar';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -168,12 +168,7 @@ export {}; "../b/src/bar.ts" ] }, - "exportedModulesMap": { - "./src/index.ts": [ - "../b/src/index.ts", - "../b/src/bar.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/index.ts", @@ -182,6 +177,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 902 + "size": 948 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-when-solution-is-already-built.js index 765128a7cfd..fe04599afb4 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function bar(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/foo.ts", + "./src/bar/foo.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/foo.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "./src/bar/foo.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar/foo.ts", + "./src/foo.ts" + ] + }, + "version": "FakeTSVersion", + "size": 911 +} //// [/user/username/projects/myproject/packages/A/lib/test.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/foo.d.ts","../b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/foo.d.ts","../b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts", + "./src/test.ts" + ], + "fileNamesList": [ + [ + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../b/lib/foo.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../b/lib/bar/foo.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/test.ts": { + "version": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/test.ts": [ + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/test.ts", + "../b/lib/bar/foo.d.ts", + "../b/lib/foo.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 994 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:10 AM] Starting compilation in watch mode... +[12:01:14 AM] Starting compilation in watch mode... -[12:01:20 AM] Found 0 errors. Watching for file changes. +[12:01:24 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks-when-solution-is-already-built.js index e7b0a69e369..7ac28369d88 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function bar(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/foo.ts", + "./src/bar/foo.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/foo.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "./src/bar/foo.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar/foo.ts", + "./src/foo.ts" + ] + }, + "version": "FakeTSVersion", + "size": 911 +} //// [/user/username/projects/myproject/packages/A/lib/test.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/b/lib/foo.d.ts","../../node_modules/b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/b/lib/foo.d.ts","../../node_modules/b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/b/lib/foo.d.ts", + "../../node_modules/b/lib/bar/foo.d.ts", + "./src/test.ts" + ], + "fileNamesList": [ + [ + "../../node_modules/b/lib/foo.d.ts", + "../../node_modules/b/lib/bar/foo.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../../node_modules/b/lib/foo.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../../node_modules/b/lib/bar/foo.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/test.ts": { + "version": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/test.ts": [ + "../../node_modules/b/lib/foo.d.ts", + "../../node_modules/b/lib/bar/foo.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/b/lib/bar/foo.d.ts", + "../../node_modules/b/lib/foo.d.ts", + "./src/test.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1026 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:10 AM] Starting compilation in watch mode... +[12:01:14 AM] Starting compilation in watch mode... -[12:01:20 AM] Found 0 errors. Watching for file changes. +[12:01:24 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks.js index a6aa5ac0f66..444de1c145a 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-preserveSymlinks.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/foo.ts (used version) /user/username/projects/myproject/packages/b/src/bar/foo.ts (used version) -/user/username/projects/myproject/packages/a/src/test.ts (used version) +/user/username/projects/myproject/packages/a/src/test.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -123,7 +123,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -156,7 +156,7 @@ export {}; }, "./src/test.ts": { "version": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n", - "signature": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -170,12 +170,7 @@ export {}; "../b/src/bar/foo.ts" ] }, - "exportedModulesMap": { - "./src/test.ts": [ - "../b/src/foo.ts", - "../b/src/bar/foo.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/test.ts", @@ -184,6 +179,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 916 + "size": 962 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-when-solution-is-already-built.js index 0a4cef0edff..b07af8c25e3 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function bar(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/foo.ts", + "./src/bar/foo.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/foo.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "./src/bar/foo.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar/foo.ts", + "./src/foo.ts" + ] + }, + "version": "FakeTSVersion", + "size": 911 +} //// [/user/username/projects/myproject/packages/A/lib/test.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/foo.d.ts","../b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/lib/foo.d.ts","../b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts", + "./src/test.ts" + ], + "fileNamesList": [ + [ + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../b/lib/foo.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../b/lib/bar/foo.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/test.ts": { + "version": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/test.ts": [ + "../b/lib/foo.d.ts", + "../b/lib/bar/foo.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/test.ts", + "../b/lib/bar/foo.d.ts", + "../b/lib/foo.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1009 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:12 AM] Starting compilation in watch mode... +[12:01:16 AM] Starting compilation in watch mode... -[12:01:22 AM] Found 0 errors. Watching for file changes. +[12:01:26 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js index 0b94e4fdea4..ae9408fe983 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks-when-solution-is-already-built.js @@ -60,7 +60,47 @@ export declare function bar(): void; //// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./src/foo.ts","./src/bar/foo.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/B/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./src/foo.ts", + "./src/bar/foo.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./src/foo.ts": { + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "./src/bar/foo.ts": { + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "./src/bar/foo.ts", + "./src/foo.ts" + ] + }, + "version": "FakeTSVersion", + "size": 911 +} //// [/user/username/projects/myproject/packages/A/lib/test.js] "use strict"; @@ -76,15 +116,72 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/@issue/b/lib/foo.d.ts","../../node_modules/@issue/b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n","-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../node_modules/@issue/b/lib/foo.d.ts","../../node_modules/@issue/b/lib/bar/foo.d.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-2904461644-export declare function bar(): void;\n",{"version":"-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/@issue/b/lib/foo.d.ts", + "../../node_modules/@issue/b/lib/bar/foo.d.ts", + "./src/test.ts" + ], + "fileNamesList": [ + [ + "../../node_modules/@issue/b/lib/foo.d.ts", + "../../node_modules/@issue/b/lib/bar/foo.d.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../../node_modules/@issue/b/lib/foo.d.ts": { + "version": "-5677608893-export declare function foo(): void;\n", + "signature": "-5677608893-export declare function foo(): void;\n" + }, + "../../node_modules/@issue/b/lib/bar/foo.d.ts": { + "version": "-2904461644-export declare function bar(): void;\n", + "signature": "-2904461644-export declare function bar(): void;\n" + }, + "./src/test.ts": { + "version": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "composite": true, + "outDir": "./lib", + "rootDir": "./src" + }, + "referencedMap": { + "./src/test.ts": [ + "../../node_modules/@issue/b/lib/foo.d.ts", + "../../node_modules/@issue/b/lib/bar/foo.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../node_modules/@issue/b/lib/bar/foo.d.ts", + "../../node_modules/@issue/b/lib/foo.d.ts", + "./src/test.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1055 +} /a/lib/tsc.js --w --p /user/username/projects/myproject/packages/A/tsconfig.json Output:: >> Screen clear -[12:01:12 AM] Starting compilation in watch mode... +[12:01:16 AM] Starting compilation in watch mode... -[12:01:22 AM] Found 0 errors. Watching for file changes. +[12:01:26 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks.js index fee6d4d90e6..99a07c3d2a3 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package-with-preserveSymlinks.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/foo.ts (used version) /user/username/projects/myproject/packages/b/src/bar/foo.ts (used version) -/user/username/projects/myproject/packages/a/src/test.ts (used version) +/user/username/projects/myproject/packages/a/src/test.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -123,7 +123,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -156,7 +156,7 @@ export {}; }, "./src/test.ts": { "version": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n", - "signature": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -170,12 +170,7 @@ export {}; "../b/src/bar/foo.ts" ] }, - "exportedModulesMap": { - "./src/test.ts": [ - "../b/src/foo.ts", - "../b/src/bar/foo.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/test.ts", @@ -184,6 +179,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 931 + "size": 977 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package.js index f4a1b0eb7a0..903e03e6061 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder-with-scoped-package.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/foo.ts (used version) /user/username/projects/myproject/packages/b/src/bar/foo.ts (used version) -/user/username/projects/myproject/packages/a/src/test.ts (used version) +/user/username/projects/myproject/packages/a/src/test.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -123,7 +123,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -156,7 +156,7 @@ export {}; }, "./src/test.ts": { "version": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n", - "signature": "-20350237855-import { foo } from '@issue/b/lib/foo';\nimport { bar } from '@issue/b/lib/bar/foo';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -170,12 +170,7 @@ export {}; "../b/src/bar/foo.ts" ] }, - "exportedModulesMap": { - "./src/test.ts": [ - "../b/src/foo.ts", - "../b/src/bar/foo.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/test.ts", @@ -184,6 +179,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 931 + "size": 977 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder.js index 8f46cda300e..5497b506179 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/when-referencing-file-from-subFolder.js @@ -64,7 +64,7 @@ Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/packages/b/src/foo.ts (used version) /user/username/projects/myproject/packages/b/src/bar/foo.ts (used version) -/user/username/projects/myproject/packages/a/src/test.ts (used version) +/user/username/projects/myproject/packages/a/src/test.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/packages/a/tsconfig.json: @@ -123,7 +123,7 @@ export {}; //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }","14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n"],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../b/src/foo.ts","../b/src/bar/foo.ts","./src/test.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"4646078106-export function foo() { }","1045484683-export function bar() { }",{"version":"14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n","signature":"-3531856636-export {};\n"}],"options":{"composite":true,"outDir":"./lib","rootDir":"./src"},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,3,2]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/A/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -156,7 +156,7 @@ export {}; }, "./src/test.ts": { "version": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n", - "signature": "14700910833-import { foo } from 'b/lib/foo';\nimport { bar } from 'b/lib/bar/foo';\nfoo();\nbar();\n" + "signature": "-3531856636-export {};\n" } }, "options": { @@ -170,12 +170,7 @@ export {}; "../b/src/bar/foo.ts" ] }, - "exportedModulesMap": { - "./src/test.ts": [ - "../b/src/foo.ts", - "../b/src/bar/foo.ts" - ] - }, + "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../../../../../a/lib/lib.d.ts", "./src/test.ts", @@ -184,6 +179,6 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 916 + "size": 962 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project-when-solution-is-already-built.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project-when-solution-is-already-built.js index 9b343b81501..1e4d9c66283 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project-when-solution-is-already-built.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project-when-solution-is-already-built.js @@ -122,7 +122,49 @@ export declare function lastElementOf(arr: T[]): T | undefined; //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} + +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../core/utilities.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../../core/utilities.ts": { + "version": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n", + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../core", + "strict": true, + "target": 1 + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../core/utilities.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1319 +} //// [/user/username/projects/demo/lib/animals/animal.js] "use strict"; @@ -178,15 +220,105 @@ export declare function createDog(): Dog; //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n","-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","signature":"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n"},{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/index.ts", + "../core/utilities.d.ts", + "../../animals/dog.ts" + ], + "fileNamesList": [ + [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" + ] + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../../animals/animal.ts": { + "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", + "signature": "-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" + }, + "../../animals/index.ts": { + "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" + }, + "../core/utilities.d.ts": { + "version": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" + }, + "../../animals/dog.ts": { + "version": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n", + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" + } + }, + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../animals", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "exportedModulesMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../core/utilities.d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2423 +} /a/lib/tsc.js --w --p /user/username/projects/demo/animals/tsconfig.json Output:: >> Screen clear -[12:01:03 AM] Starting compilation in watch mode... +[12:01:07 AM] Starting compilation in watch mode... -[12:01:19 AM] Found 0 errors. Watching for file changes. +[12:01:17 AM] Found 0 errors. Watching for file changes. @@ -201,14 +333,12 @@ Program files:: /user/username/projects/demo/animals/dog.ts Semantic diagnostics in builder refreshed for:: -/user/username/projects/demo/animals/index.ts /user/username/projects/demo/core/utilities.ts /user/username/projects/demo/animals/dog.ts Shape signatures in builder refreshed for:: /user/username/projects/demo/core/utilities.ts (computed .d.ts) /user/username/projects/demo/animals/dog.ts (computed .d.ts) -/user/username/projects/demo/animals/index.ts (computed .d.ts) WatchedFiles:: /user/username/projects/demo/animals/tsconfig.json: @@ -246,12 +376,10 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined -//// [/user/username/projects/demo/lib/animals/index.js] file written with same contents -//// [/user/username/projects/demo/lib/animals/index.d.ts] file written with same contents //// [/user/username/projects/demo/lib/animals/dog.js] file written with same contents //// [/user/username/projects/demo/lib/animals/dog.d.ts] file written with same contents //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../../core/utilities.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n",{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"},{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../../core/utilities.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","signature":"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n"},{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"},{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -284,7 +412,7 @@ exitCode:: ExitStatus.undefined }, "../../animals/animal.ts": { "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", - "signature": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + "signature": "-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" }, "../../animals/index.ts": { "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", @@ -340,6 +468,6 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 2536 + "size": 2695 } diff --git a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project.js b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project.js index 26455e87f76..f4c8657f89a 100644 --- a/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project.js +++ b/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/with-simple-project.js @@ -129,10 +129,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) -/user/username/projects/demo/animals/animal.ts (used version) -/user/username/projects/demo/animals/index.ts (used version) +/user/username/projects/demo/animals/animal.ts (computed .d.ts during emit) +/user/username/projects/demo/animals/index.ts (computed .d.ts during emit) /user/username/projects/demo/core/utilities.ts (used version) -/user/username/projects/demo/animals/dog.ts (used version) +/user/username/projects/demo/animals/dog.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/demo/animals/tsconfig.json: @@ -224,7 +224,7 @@ export declare function createDog(): Dog; //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../../core/utilities.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n","-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n"],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,1],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../../core/utilities.ts","../../animals/dog.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n","signature":"-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n"},{"version":"-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n",{"version":"-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"fileIdsList":[[3,4],[2,5],[3]],"referencedMap":[[5,1],[3,2]],"exportedModulesMap":[[5,3],[3,2]],"semanticDiagnosticsPerFile":[1,2,5,3,4]},"version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -244,6 +244,9 @@ export declare function createDog(): Dog; [ "../../animals/animal.ts", "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" ] ], "fileInfos": { @@ -254,11 +257,11 @@ export declare function createDog(): Dog; }, "../../animals/animal.ts": { "version": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n", - "signature": "-14984181202-export type Size = \"small\" | \"medium\" | \"large\";\r\nexport default interface Animal {\r\n size: Size;\r\n}\r\n" + "signature": "-10510161654-export declare type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" }, "../../animals/index.ts": { "version": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n", - "signature": "-5382672599-import Animal from './animal';\r\n\r\nexport default Animal;\r\nimport { createDog, Dog } from './dog';\r\nexport { createDog, Dog };\r\n" + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" }, "../../core/utilities.ts": { "version": "25274411612-\r\nexport function makeRandomName() {\r\n return \"Bob!?! \";\r\n}\r\n\r\nexport function lastElementOf(arr: T[]): T | undefined {\r\n if (arr.length === 0) return undefined;\r\n return arr[arr.length - 1];\r\n}\r\n\r\n", @@ -266,7 +269,7 @@ export declare function createDog(): Dog; }, "../../animals/dog.ts": { "version": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n", - "signature": "-10991948013-import Animal from '.';\r\nimport { makeRandomName } from '../core/utilities';\r\n\r\nexport interface Dog extends Animal {\r\n woof(): void;\r\n name: string;\r\n}\r\n\r\nexport function createDog(): Dog {\r\n return ({\r\n size: \"medium\",\r\n woof: function(this: Dog) {\r\n console.log(`${this.name} says \"Woof\"!`);\r\n },\r\n name: makeRandomName()\r\n });\r\n}\r\n\r\n" + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" } }, "options": { @@ -294,8 +297,7 @@ export declare function createDog(): Dog; }, "exportedModulesMap": { "../../animals/dog.ts": [ - "../../animals/index.ts", - "../../core/utilities.ts" + "../../animals/index.ts" ], "../../animals/index.ts": [ "../../animals/animal.ts", @@ -311,6 +313,6 @@ export declare function createDog(): Dog; ] }, "version": "FakeTSVersion", - "size": 2024 + "size": 2536 } diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js index fc6493f8707..9c424cba570 100644 --- a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js +++ b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js @@ -163,7 +163,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-10726455937-export const x = 10;","-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -181,11 +181,11 @@ exitCode:: ExitStatus.undefined }, "./main.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6821242887-export declare const x = 10;\n" }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -200,7 +200,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 701 + "size": 839 } //// [/user/username/projects/myproject/main.js] @@ -278,7 +278,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -300,7 +300,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -321,7 +321,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 821 + "size": 890 } @@ -367,7 +367,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -389,7 +389,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -404,7 +404,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 786 + "size": 855 } //// [/user/username/projects/myproject/main.js] @@ -470,7 +470,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -492,7 +492,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -507,7 +507,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 802 + "size": 871 } //// [/user/username/projects/myproject/main.js] diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js index e3d303320d6..0b673432958 100644 --- a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js +++ b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js @@ -170,7 +170,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-10726455937-export const x = 10;","-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -188,11 +188,11 @@ exitCode:: ExitStatus.undefined }, "./main.ts": { "version": "-10726455937-export const x = 10;", - "signature": "-10726455937-export const x = 10;" + "signature": "-6821242887-export declare const x = 10;\n" }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -207,7 +207,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 701 + "size": 839 } //// [/user/username/projects/myproject/main.js] @@ -292,7 +292,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -314,7 +314,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -335,7 +335,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 821 + "size": 890 } @@ -388,7 +388,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -410,7 +410,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -425,7 +425,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 786 + "size": 855 } //// [/user/username/projects/myproject/main.js] @@ -498,7 +498,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -520,7 +520,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -535,7 +535,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 802 + "size": 871 } //// [/user/username/projects/myproject/main.js] diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js index 746f207f20c..4ca9f5dcdf6 100644 --- a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js +++ b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js @@ -311,7 +311,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -333,7 +333,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -349,7 +349,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 791 + "size": 860 } //// [/user/username/projects/myproject/main.js] diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js index 4ac14799857..d5fd4d074b4 100644 --- a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js +++ b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js @@ -325,7 +325,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -347,7 +347,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -363,7 +363,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 791 + "size": 860 } //// [/user/username/projects/myproject/main.js] diff --git a/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js b/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js index d00e3ef9749..2124226bf44 100644 --- a/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js +++ b/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js @@ -189,7 +189,7 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},"-13729955264-export const y = 10;"],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1],[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1],[3,1]]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -211,7 +211,7 @@ exitCode:: ExitStatus.undefined }, "./other.ts": { "version": "-13729955264-export const y = 10;", - "signature": "-13729955264-export const y = 10;" + "signature": "-7152472870-export declare const y = 10;\n" } }, "options": { @@ -237,7 +237,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 832 + "size": 901 } //// [/user/username/projects/myproject/main.d.ts] diff --git a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js index 9ec37ab2c39..4118a2f21c3 100644 --- a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js +++ b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js @@ -74,7 +74,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/projects/project1/class1.d.ts (used version) -/user/username/projects/myproject/projects/project2/class2.ts (used version) +/user/username/projects/myproject/projects/project2/class2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/projects/project2/tsconfig.json: @@ -118,7 +118,7 @@ declare class class2 { //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -141,7 +141,7 @@ declare class class2 { }, "./class2.ts": { "version": "777969115-class class2 {}", - "signature": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", "affectsGlobalScope": true } }, @@ -156,7 +156,7 @@ declare class class2 { ] }, "version": "FakeTSVersion", - "size": 760 + "size": 814 } diff --git a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js index 6593e9d8cf2..d75dca26348 100644 --- a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js +++ b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js @@ -74,7 +74,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/projects/project1/class1.ts (used version) -/user/username/projects/myproject/projects/project2/class2.ts (used version) +/user/username/projects/myproject/projects/project2/class2.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/projects/project2/tsconfig.json: @@ -118,7 +118,7 @@ declare class class2 { //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"777933178-class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"777933178-class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} //// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -141,7 +141,7 @@ declare class class2 { }, "./class2.ts": { "version": "777969115-class class2 {}", - "signature": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", "affectsGlobalScope": true } }, @@ -156,7 +156,7 @@ declare class class2 { ] }, "version": "FakeTSVersion", - "size": 748 + "size": 802 } diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js index 9abf4fa0ace..37fd4927ba2 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js @@ -47,7 +47,7 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/myproject/node_modules/file2/index.d.ts (used version) -/user/username/projects/myproject/src/file1.ts (used version) +/user/username/projects/myproject/src/file1.ts (computed .d.ts during emit) WatchedFiles:: /user/username/projects/myproject/tsconfig.json: diff --git a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt index a967c92e555..81231a34562 100644 --- a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt +++ b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt @@ -5,17 +5,9 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,14): error TS2769: No o Type '{}' is not assignable to type 'Readonly

'. Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error. Type '{}' is not assignable to type 'Readonly

'. -tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(17,14): error TS2322: Type 'P' is not assignable to type 'IntrinsicAttributes & P'. - Type 'P' is not assignable to type 'IntrinsicAttributes'. -tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(18,14): error TS2769: No overload matches this call. - Overload 1 of 2, '(props: Readonly

): MyComponent', gave the following error. - Type 'P' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: ReactNode; }> & Readonly

'. - Type 'P' is not assignable to type 'IntrinsicAttributes'. - Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error. - Type 'P' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: ReactNode; }> & Readonly

'. -==== tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx (4 errors) ==== +==== tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx (2 errors) ==== /// import React from 'react'; @@ -42,17 +34,5 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(18,14): error TS2769: No o !!! error TS2769: Type '{}' is not assignable to type 'Readonly

'. let z = // should work - ~~~~~ -!!! error TS2322: Type 'P' is not assignable to type 'IntrinsicAttributes & P'. -!!! error TS2322: Type 'P' is not assignable to type 'IntrinsicAttributes'. -!!! related TS2208 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15: This type parameter probably needs an `extends object` constraint. let q = // should work - ~~~~~~~~~~~ -!!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 2, '(props: Readonly

): MyComponent', gave the following error. -!!! error TS2769: Type 'P' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: ReactNode; }> & Readonly

'. -!!! error TS2769: Type 'P' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2769: Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error. -!!! error TS2769: Type 'P' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: ReactNode; }> & Readonly

'. -!!! related TS2208 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15: This type parameter probably needs an `extends object` constraint. } \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadInvalidType.errors.txt b/tests/baselines/reference/tsxSpreadInvalidType.errors.txt new file mode 100644 index 00000000000..4a0023deb1c --- /dev/null +++ b/tests/baselines/reference/tsxSpreadInvalidType.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/jsx/a.tsx(9,21): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/jsx/a.tsx(10,21): error TS2698: Spread types may only be created from object types. +tests/cases/conformance/jsx/a.tsx(11,21): error TS2698: Spread types may only be created from object types. + + +==== tests/cases/conformance/jsx/a.tsx (3 errors) ==== + namespace JSX { + export interface IntrinsicElements { [key: string]: any } + } + + const a = {} as never; + const b = null; + const c = undefined; + + const d =

+ ~ +!!! error TS2698: Spread types may only be created from object types. + const e =
+ ~ +!!! error TS2698: Spread types may only be created from object types. + const f =
+ ~ +!!! error TS2698: Spread types may only be created from object types. + \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadInvalidType.js b/tests/baselines/reference/tsxSpreadInvalidType.js new file mode 100644 index 00000000000..5db598cd45f --- /dev/null +++ b/tests/baselines/reference/tsxSpreadInvalidType.js @@ -0,0 +1,22 @@ +//// [a.tsx] +namespace JSX { + export interface IntrinsicElements { [key: string]: any } +} + +const a = {} as never; +const b = null; +const c = undefined; + +const d =
+const e =
+const f =
+ + +//// [a.jsx] +"use strict"; +var a = {}; +var b = null; +var c = undefined; +var d =
; +var e =
; +var f =
; diff --git a/tests/baselines/reference/tsxSpreadInvalidType.symbols b/tests/baselines/reference/tsxSpreadInvalidType.symbols new file mode 100644 index 00000000000..efb8d3cd58b --- /dev/null +++ b/tests/baselines/reference/tsxSpreadInvalidType.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/jsx/a.tsx === +namespace JSX { +>JSX : Symbol(JSX, Decl(a.tsx, 0, 0)) + + export interface IntrinsicElements { [key: string]: any } +>IntrinsicElements : Symbol(IntrinsicElements, Decl(a.tsx, 0, 15)) +>key : Symbol(key, Decl(a.tsx, 1, 42)) +} + +const a = {} as never; +>a : Symbol(a, Decl(a.tsx, 4, 5)) + +const b = null; +>b : Symbol(b, Decl(a.tsx, 5, 5)) + +const c = undefined; +>c : Symbol(c, Decl(a.tsx, 6, 5)) +>undefined : Symbol(undefined) + +const d =
+>d : Symbol(d, Decl(a.tsx, 8, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(a.tsx, 0, 15)) +>a : Symbol(a, Decl(a.tsx, 4, 5)) + +const e =
+>e : Symbol(e, Decl(a.tsx, 9, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(a.tsx, 0, 15)) +>b : Symbol(b, Decl(a.tsx, 5, 5)) + +const f =
+>f : Symbol(f, Decl(a.tsx, 10, 5)) +>div : Symbol(JSX.IntrinsicElements, Decl(a.tsx, 0, 15)) +>c : Symbol(c, Decl(a.tsx, 6, 5)) + diff --git a/tests/baselines/reference/tsxSpreadInvalidType.types b/tests/baselines/reference/tsxSpreadInvalidType.types new file mode 100644 index 00000000000..e834f2f3f4b --- /dev/null +++ b/tests/baselines/reference/tsxSpreadInvalidType.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/jsx/a.tsx === +namespace JSX { + export interface IntrinsicElements { [key: string]: any } +>key : string +} + +const a = {} as never; +>a : never +>{} as never : never +>{} : {} + +const b = null; +>b : null +>null : null + +const c = undefined; +>c : undefined +>undefined : undefined + +const d =
+>d : any +>
: any +>div : any +>a : never + +const e =
+>e : any +>
: any +>div : any +>b : null + +const f =
+>f : any +>
: any +>div : any +>c : undefined + diff --git a/tests/baselines/reference/unknownType1.errors.txt b/tests/baselines/reference/unknownType1.errors.txt index 39d7a1feb52..138fff847cc 100644 --- a/tests/baselines/reference/unknownType1.errors.txt +++ b/tests/baselines/reference/unknownType1.errors.txt @@ -25,14 +25,13 @@ tests/cases/conformance/types/unknown/unknownType1.ts(144,29): error TS2698: Spr tests/cases/conformance/types/unknown/unknownType1.ts(150,17): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. tests/cases/conformance/types/unknown/unknownType1.ts(156,14): error TS2700: Rest types may only be created from object types. tests/cases/conformance/types/unknown/unknownType1.ts(162,5): error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor. -tests/cases/conformance/types/unknown/unknownType1.ts(170,9): error TS2322: Type 'T' is not assignable to type '{}'. tests/cases/conformance/types/unknown/unknownType1.ts(171,9): error TS2322: Type 'U' is not assignable to type '{}'. Type 'unknown' is not assignable to type '{}'. tests/cases/conformance/types/unknown/unknownType1.ts(181,5): error TS2322: Type 'T' is not assignable to type '{}'. Type 'unknown' is not assignable to type '{}'. -==== tests/cases/conformance/types/unknown/unknownType1.ts (28 errors) ==== +==== tests/cases/conformance/types/unknown/unknownType1.ts (27 errors) ==== // In an intersection everything absorbs unknown type T00 = unknown & null; // null @@ -255,9 +254,6 @@ tests/cases/conformance/types/unknown/unknownType1.ts(181,5): error TS2322: Type function f30(t: T, u: U) { let x: {} = t; - ~ -!!! error TS2322: Type 'T' is not assignable to type '{}'. -!!! related TS2208 tests/cases/conformance/types/unknown/unknownType1.ts:169:14: This type parameter probably needs an `extends object` constraint. let y: {} = u; ~ !!! error TS2322: Type 'U' is not assignable to type '{}'. diff --git a/tests/cases/compiler/constructorWithParameterPropertiesAndPrivateFields.es2015.ts b/tests/cases/compiler/constructorWithParameterPropertiesAndPrivateFields.es2015.ts new file mode 100644 index 00000000000..ec0fd2464d2 --- /dev/null +++ b/tests/cases/compiler/constructorWithParameterPropertiesAndPrivateFields.es2015.ts @@ -0,0 +1,29 @@ +// @target: es2015 +// https://github.com/microsoft/TypeScript/issues/48771 + +class A { + readonly #privateField: string; + + constructor(arg: { key: string }, public exposedField: number) { + ({ key: this.#privateField } = arg); + } + + log() { + console.log(this.#privateField); + console.log(this.exposedField); + } +} + +class B { + readonly #privateField: string; + + constructor(arg: { key: string }, public exposedField: number) { + "prologue"; + ({ key: this.#privateField } = arg); + } + + log() { + console.log(this.#privateField); + console.log(this.exposedField); + } +} diff --git a/tests/cases/compiler/constructorWithSuperAndPrologue.es5.ts b/tests/cases/compiler/constructorWithSuperAndPrologue.es5.ts new file mode 100644 index 00000000000..1f4fc747648 --- /dev/null +++ b/tests/cases/compiler/constructorWithSuperAndPrologue.es5.ts @@ -0,0 +1,17 @@ +// @target: es5 +// https://github.com/microsoft/TypeScript/issues/48761 +"use strict"; + +class A { + public constructor() { + console.log("A") + } +} + +class B extends A { + constructor() { + "ngInject"; + console.log("B") + super(); + } +} diff --git a/tests/cases/compiler/importElisionEnum.ts b/tests/cases/compiler/importElisionEnum.ts new file mode 100644 index 00000000000..89989cc7b53 --- /dev/null +++ b/tests/cases/compiler/importElisionEnum.ts @@ -0,0 +1,14 @@ +// @Filename: enum.ts +export enum MyEnum { + a = 0, + b, + c, + d +} + +// @Filename: index.ts +import { MyEnum as MyEnumFromModule } from "./enum"; + +enum MyEnum { + a = MyEnumFromModule.a +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleResolutionWithModule.ts b/tests/cases/compiler/moduleResolutionWithModule.ts index de0c873cdd0..74601d43da2 100644 --- a/tests/cases/compiler/moduleResolutionWithModule.ts +++ b/tests/cases/compiler/moduleResolutionWithModule.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node,node12,nodenext -// @module: commonjs,node12,nodenext +// @moduleResolution: node16,nodenext +// @module: commonjs,node16,nodenext // @filename: node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/compiler/newLineInTypeofInstantiation.ts b/tests/cases/compiler/newLineInTypeofInstantiation.ts new file mode 100644 index 00000000000..99259acec79 --- /dev/null +++ b/tests/cases/compiler/newLineInTypeofInstantiation.ts @@ -0,0 +1,5 @@ +interface Example { + (a: number): typeof a + + (): void +} diff --git a/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts b/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts new file mode 100644 index 00000000000..a0a8dfb8e7b --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageImportMapRootDir.ts @@ -0,0 +1,20 @@ +// @module: nodenext +// @outDir: ./dist +// @rootDir: tests/cases/compiler +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "imports": { + "#dep": "./dist/index.js" + } +} +// @filename: index.ts +import * as me from "#dep"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDir.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDir.ts new file mode 100644 index 00000000000..71c1494aafb --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDir.ts @@ -0,0 +1,16 @@ +// @module: nodenext +// @outDir: ./dist +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + } +} +// @filename: index.ts +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDir.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDir.ts new file mode 100644 index 00000000000..f495002c9e4 --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDir.ts @@ -0,0 +1,21 @@ +// @module: nodenext +// @outDir: ./dist +// @declarationDir: ./types +// @declaration: true +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +// @filename: index.ts +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirComposite.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirComposite.ts new file mode 100644 index 00000000000..c8efa7f7677 --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirComposite.ts @@ -0,0 +1,26 @@ +// @filename: tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "outDir": "./dist", + "declarationDir": "./types", + "composite": true + } +} +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +// @filename: index.ts +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.ts new file mode 100644 index 00000000000..df09199ced6 --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.ts @@ -0,0 +1,37 @@ +// @noImplicitReferences: true +// @filename: tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "outDir": "./dist", + "declarationDir": "./types", + "composite": true + } +} +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +// @filename: index.ts +export {srcthing as thing} from "./src/thing.js"; +// @filename: src/thing.ts +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; + +me.thing(); + +export function srcthing(): void {} + diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.ts new file mode 100644 index 00000000000..f8e28e05f7c --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.ts @@ -0,0 +1,37 @@ +// @noImplicitReferences: true +// @filename: tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "outDir": "./dist", + "declarationDir": "./types", + "declaration": true + } +} +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +// @filename: index.ts +export {srcthing as thing} from "./src/thing.js"; +// @filename: src/thing.ts +// The following import should cause `index.ts` +// to be included in the build, which will, +// in turn, cause the common src directory to not be `src` +// (the harness is wierd here in that noImplicitReferences makes only +// this file get loaded as an entrypoint and emitted, while on the +// real command-line we'll crawl the imports for that set - a limitation +// of the harness, I suppose) +import * as me from "@this/package"; + +me.thing(); + +export function srcthing(): void {} + diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.ts new file mode 100644 index 00000000000..5857765749f --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirRootDir.ts @@ -0,0 +1,22 @@ +// @module: nodenext +// @outDir: /pkg/dist +// @declarationDir: /pkg/types +// @declaration: true +// @rootDir: /pkg/src +// @filename: /pkg/package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } +} +// @filename: /pkg/src/index.ts +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts new file mode 100644 index 00000000000..1e32c30e683 --- /dev/null +++ b/tests/cases/compiler/nodeNextPackageSelfNameWithOutDirRootDir.ts @@ -0,0 +1,17 @@ +// @module: nodenext +// @outDir: ./dist +// @rootDir: tests/cases/compiler +// @filename: package.json +{ + "name": "@this/package", + "type": "module", + "exports": { + ".": "./dist/index.js" + } +} +// @filename: index.ts +import * as me from "@this/package"; + +me.thing(); + +export function thing(): void {} diff --git a/tests/cases/compiler/tripleSlashTypesReferenceWithMissingExports.ts b/tests/cases/compiler/tripleSlashTypesReferenceWithMissingExports.ts index d5b58f5077f..fe80146389c 100644 --- a/tests/cases/compiler/tripleSlashTypesReferenceWithMissingExports.ts +++ b/tests/cases/compiler/tripleSlashTypesReferenceWithMissingExports.ts @@ -1,4 +1,4 @@ -// @module: commonjs,node12,nodenext +// @module: commonjs,node16,nodenext // @filename: node_modules/pkg/index.d.ts interface GlobalThing { a: number } // @filename: node_modules/pkg/package.json diff --git a/tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts b/tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts deleted file mode 100644 index 3a7e966130a..00000000000 --- a/tests/cases/conformance/classes/members/privateNames/privateNameInTypeQuery.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @strict: true -// @target: esnext - -class C { - #a = 'a'; - - constructor() { - const a: typeof this.#a = ''; // Ok - const b: typeof this.#a = 1; // Error - } -} - -const c = new C(); -const a: typeof c.#a = ''; diff --git a/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts index b56045e7ec0..ae11c010fad 100644 --- a/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts +++ b/tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts @@ -312,3 +312,18 @@ const f60: Func = (kind, payload) => { payload.toUpperCase(); // error } }; + +// Repro from #48902 + +function foo({ + value1, + test1 = value1.test1, + test2 = value1.test2, + test3 = value1.test3, + test4 = value1.test4, + test5 = value1.test5, + test6 = value1.test6, + test7 = value1.test7, + test8 = value1.test8, + test9 = value1.test9 +}) {} diff --git a/tests/cases/conformance/declarationEmit/exportDefaultExpressionComments.ts b/tests/cases/conformance/declarationEmit/exportDefaultExpressionComments.ts new file mode 100644 index 00000000000..a7477cc7557 --- /dev/null +++ b/tests/cases/conformance/declarationEmit/exportDefaultExpressionComments.ts @@ -0,0 +1,6 @@ +// @declaration: true + +/** + * JSDoc Comments + */ +export default null diff --git a/tests/cases/conformance/es2019/globalThisAmbientModules.ts b/tests/cases/conformance/es2019/globalThisAmbientModules.ts new file mode 100644 index 00000000000..5f170a0de27 --- /dev/null +++ b/tests/cases/conformance/es2019/globalThisAmbientModules.ts @@ -0,0 +1,11 @@ +declare module "ambientModule" { + export type typ = 1 + export var val: typ +} +namespace valueModule { export var val = 1 } +namespace namespaceModule { export type typ = 1 } +// should error +type GlobalBad1 = (typeof globalThis)["\"ambientModule\""] +type GlobalOk1 = (typeof globalThis)["valueModule"] +type GlobalOk2 = globalThis.namespaceModule.typ +const bad1: (typeof globalThis)["\"ambientModule\""] = 'ambientModule' diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts index 83e86fc6c60..0b740390a8a 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/foo.mts export function foo() { diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts index 0051e17401c..a7adfbcac57 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension2.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/buzz.mts // Extensionless relative path cjs import in an ES module diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts index 5053a242cd5..08011b2be63 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension5.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/buzz.mts // Extensionless relative path dynamic import in an ES module diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts index 2a6ef2645dd..c846e6fd260 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension6.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/bar.cts // Extensionless relative path import statement in a cjs module diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts index 3b10dd6e48a..f5e27470a02 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension7.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/bar.cts // Extensionless relative path cjs import in a cjs module diff --git a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts index fef17b3aa1e..d862ba69de1 100644 --- a/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts +++ b/tests/cases/conformance/externalModules/moduleResolutionWithoutExtension8.ts @@ -1,5 +1,5 @@ -// @moduleResolution: node12 -// @module: node12 +// @moduleResolution: node16 +// @module: node16 // @filename: /src/bar.cts // Extensionless relative path dynamic import in a cjs module diff --git a/tests/cases/conformance/jsx/tsxSpreadInvalidType.tsx b/tests/cases/conformance/jsx/tsxSpreadInvalidType.tsx new file mode 100644 index 00000000000..c06430dd7de --- /dev/null +++ b/tests/cases/conformance/jsx/tsxSpreadInvalidType.tsx @@ -0,0 +1,14 @@ +// @jsx: preserve +// @strict: true +// @filename: a.tsx +namespace JSX { + export interface IntrinsicElements { [key: string]: any } +} + +const a = {} as never; +const b = null; +const c = undefined; + +const d =
+const e =
+const f =
diff --git a/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts b/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts index a19a7104ae1..bf4718d847a 100644 --- a/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts +++ b/tests/cases/conformance/node/allowJs/nodeAllowJsPackageSelfName.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts index 113c1fdeb8a..f790752053f 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJs1.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts index ea0821742f8..74143dcefaa 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsCjsFromJs.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @allowJs: true // @noEmit: true // @filename: foo.cjs diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts index 1020812d5ae..f6f62444a61 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsConditionalPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts index d7032c648b4..5da3c3e5425 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsDynamicImport.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts index f7d5aaf822a..0457ce4cb62 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsExportAssignment.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts index 14783731bf9..7cb94da8f60 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsGeneratedNameCollisions.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts index 53e6b944500..2688b07fb99 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportAssignment.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts index d5727a3dc78..26874896143 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions1.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @allowJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts index 032290f78ba..af20a16ba76 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @allowJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts index 9452e2003a6..a6b91898853 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions3.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @allowJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts index a8708434b93..43fdf016c43 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportMeta.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts index 65e5721b0bb..23de392ed7e 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts index b9d6027f5d7..84d0f650abc 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackageImports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts index 2691885690b..eab5792b8fb 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts index 6b96f347583..b8ea4f9cbd8 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsTrailers.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts index 15892edbe32..78025e25074 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsSynchronousCallErrors.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts index 872cad71c91..e18c50fef7a 100644 --- a/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts +++ b/tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @allowJs: true // @checkJs: true diff --git a/tests/cases/conformance/node/nodeModules1.ts b/tests/cases/conformance/node/nodeModules1.ts index 698a6efec1e..32c83b4525b 100644 --- a/tests/cases/conformance/node/nodeModules1.ts +++ b/tests/cases/conformance/node/nodeModules1.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts b/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts index 06c6320d779..31051b3a18b 100644 --- a/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts +++ b/tests/cases/conformance/node/nodeModulesCjsFormatFileAlwaysHasDefault.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts b/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts index 07bf9d9724c..a0240cdef4e 100644 --- a/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesConditionalPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts index 2599ff429ff..9b4eb3ec9f8 100644 --- a/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitWithPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodeModulesDynamicImport.ts b/tests/cases/conformance/node/nodeModulesDynamicImport.ts index 46b317ca52d..0864b42bbaf 100644 --- a/tests/cases/conformance/node/nodeModulesDynamicImport.ts +++ b/tests/cases/conformance/node/nodeModulesDynamicImport.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesExportAssignments.ts b/tests/cases/conformance/node/nodeModulesExportAssignments.ts index 7cbcd200d96..efc867fa1c6 100644 --- a/tests/cases/conformance/node/nodeModulesExportAssignments.ts +++ b/tests/cases/conformance/node/nodeModulesExportAssignments.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts index ffc5adf8e07..ee6587b5ea0 100644 --- a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts +++ b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts index 2562c7a4a11..92c686f1c23 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts index 2eb8ac58e66..684cb5588fc 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts index 97812da5b57..a325a2dfe6c 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts index d441627d7d0..ca9ff3cf413 100644 --- a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts +++ b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts b/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts index e9a9b9d9edd..6f6fa8acb07 100644 --- a/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts +++ b/tests/cases/conformance/node/nodeModulesGeneratedNameCollisions.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesImportAssertions.ts b/tests/cases/conformance/node/nodeModulesImportAssertions.ts index 0fe1ccdf820..ae941bd003b 100644 --- a/tests/cases/conformance/node/nodeModulesImportAssertions.ts +++ b/tests/cases/conformance/node/nodeModulesImportAssertions.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @resolveJsonModule: true // @filename: index.ts import json from "./package.json" assert { type: "json" }; diff --git a/tests/cases/conformance/node/nodeModulesImportAssignments.ts b/tests/cases/conformance/node/nodeModulesImportAssignments.ts index 6c22fe83e00..cce29eb0d75 100644 --- a/tests/cases/conformance/node/nodeModulesImportAssignments.ts +++ b/tests/cases/conformance/node/nodeModulesImportAssignments.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts index 103b5837124..0a4698a95fb 100644 --- a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts +++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @filename: subfolder/index.ts diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts index 7f90947a5fb..58e65723cbc 100644 --- a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts +++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @filename: subfolder/index.ts diff --git a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts index 5f6984ad1fb..3145df76cd5 100644 --- a/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts +++ b/tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @importHelpers: true // @filename: subfolder/index.ts diff --git a/tests/cases/conformance/node/nodeModulesImportMeta.ts b/tests/cases/conformance/node/nodeModulesImportMeta.ts index d684c7b5cb2..cc8bdcce9da 100644 --- a/tests/cases/conformance/node/nodeModulesImportMeta.ts +++ b/tests/cases/conformance/node/nodeModulesImportMeta.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit1.ts b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit1.ts index 5a9a0ef8cee..c1c0c57cf9d 100644 --- a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit1.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit2.ts b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit2.ts index 7b819fddf49..06a9b226b21 100644 --- a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit2.ts +++ b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmit2.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmitErrors1.ts b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmitErrors1.ts index 1e475dfc63a..01907185636 100644 --- a/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmitErrors1.ts +++ b/tests/cases/conformance/node/nodeModulesImportModeDeclarationEmitErrors1.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts b/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts index 2a407b2bc68..58a8adbf9b0 100644 --- a/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts +++ b/tests/cases/conformance/node/nodeModulesImportResolutionIntoExport.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts b/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts index c0482c86ec2..b3a4139a00c 100644 --- a/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts +++ b/tests/cases/conformance/node/nodeModulesImportResolutionNoCycle.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts index 41d64844e09..c6ca4e2f13f 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts index d6f35e46385..d118bc6da29 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesPackageExports.ts b/tests/cases/conformance/node/nodeModulesPackageExports.ts index 897d01b07d7..6433e49270f 100644 --- a/tests/cases/conformance/node/nodeModulesPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodeModulesPackageImports.ts b/tests/cases/conformance/node/nodeModulesPackageImports.ts index cccf930098e..55122ed464f 100644 --- a/tests/cases/conformance/node/nodeModulesPackageImports.ts +++ b/tests/cases/conformance/node/nodeModulesPackageImports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts b/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts index e22e497a942..4a4af53809a 100644 --- a/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts +++ b/tests/cases/conformance/node/nodeModulesPackagePatternExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts b/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts index 3abe36e0d69..ad842bcdb4a 100644 --- a/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts +++ b/tests/cases/conformance/node/nodeModulesPackagePatternExportsTrailers.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts b/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts index c298685c228..33bc45a2a07 100644 --- a/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts +++ b/tests/cases/conformance/node/nodeModulesResolveJsonModule.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @resolveJsonModule: true // @outDir: ./out // @declaration: true diff --git a/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts b/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts index 78aa93ee17c..203760b4e5d 100644 --- a/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts +++ b/tests/cases/conformance/node/nodeModulesSynchronousCallErrors.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts b/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts index 2fbd5d3b0cd..0e532ced3ba 100644 --- a/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts +++ b/tests/cases/conformance/node/nodeModulesTopLevelAwait.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts // cjs format file diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit1.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit1.ts index 8e99536aa8c..b1e4156f7fe 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit1.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit2.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit2.ts index 9349d1c2767..501d62d8db4 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit2.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit2.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit3.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit3.ts index 8c16d1bd455..5ccdd5f1f9f 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit3.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit3.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit4.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit4.ts index 6d778bb754c..2efe66d7462 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit4.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit4.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit5.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit5.ts index 6694ad03d8d..849f1ee97cd 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit5.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit5.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit6.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit6.ts index 8a38a967170..4ceec4badef 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit6.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit6.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit7.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit7.ts index 317728fbaa8..5260cc2ae77 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit7.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeDeclarationEmit7.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: /node_modules/pkg/package.json diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride1.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride1.ts index 061d16a7560..c488964766d 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride1.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride1.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride2.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride2.ts index 105e52cf2d8..79eeba94abf 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride2.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride2.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts index d183196f176..74a9d2fffe5 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride4.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride4.ts index 466d47fba20..26bc3c8f393 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride4.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride4.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride5.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride5.ts index e9198bd5107..2174f959237 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride5.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride5.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverrideModeError.ts b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverrideModeError.ts index 197b2db20ba..84828c5dabb 100644 --- a/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverrideModeError.ts +++ b/tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverrideModeError.ts @@ -1,5 +1,5 @@ // @noImplicitReferences: true -// @module: node12,nodenext +// @module: node16,nodenext // @outDir: out // @filename: /node_modules/pkg/package.json { diff --git a/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts b/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts index 52cda091b32..1cdaef53f24 100644 --- a/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesTypesVersionPackageExports.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @outDir: out // @filename: index.ts diff --git a/tests/cases/conformance/node/nodePackageSelfName.ts b/tests/cases/conformance/node/nodePackageSelfName.ts index 099d9c424e1..ec9dd150591 100644 --- a/tests/cases/conformance/node/nodePackageSelfName.ts +++ b/tests/cases/conformance/node/nodePackageSelfName.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/node/nodePackageSelfNameScoped.ts b/tests/cases/conformance/node/nodePackageSelfNameScoped.ts index f4ef1e3798c..9e9eef38496 100644 --- a/tests/cases/conformance/node/nodePackageSelfNameScoped.ts +++ b/tests/cases/conformance/node/nodePackageSelfNameScoped.ts @@ -1,4 +1,4 @@ -// @module: node12,nodenext +// @module: node16,nodenext // @declaration: true // @filename: index.ts // esm format file diff --git a/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression15.ts b/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression15.ts new file mode 100644 index 00000000000..3348d24bfeb --- /dev/null +++ b/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression15.ts @@ -0,0 +1 @@ +false ? (param): string => param : null diff --git a/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression16.ts b/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression16.ts new file mode 100644 index 00000000000..9a19bfdb6cf --- /dev/null +++ b/tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression16.ts @@ -0,0 +1 @@ +true ? false ? (param): string => param : null : null diff --git a/tests/cases/conformance/salsa/reExportJsFromTs.ts b/tests/cases/conformance/salsa/reExportJsFromTs.ts new file mode 100644 index 00000000000..860692e393a --- /dev/null +++ b/tests/cases/conformance/salsa/reExportJsFromTs.ts @@ -0,0 +1,11 @@ +// @allowJs: true +// @outDir: out + +// @Filename: /lib/constants.js +module.exports = { + str: 'x', +}; + +// @Filename: /src/constants.ts +import * as tsConstants from "../lib/constants"; +export { tsConstants }; \ No newline at end of file diff --git a/tests/cases/conformance/types/import/importWithTypeArguments.ts b/tests/cases/conformance/types/import/importWithTypeArguments.ts new file mode 100644 index 00000000000..684260429c2 --- /dev/null +++ b/tests/cases/conformance/types/import/importWithTypeArguments.ts @@ -0,0 +1,2 @@ +import +const a = import diff --git a/tests/cases/conformance/types/literal/numericStringLiteralTypes.ts b/tests/cases/conformance/types/literal/numericStringLiteralTypes.ts new file mode 100644 index 00000000000..cb12bde1d45 --- /dev/null +++ b/tests/cases/conformance/types/literal/numericStringLiteralTypes.ts @@ -0,0 +1,40 @@ +// @strict: true +// @declaration: true + +type T0 = string & `${string}`; // string +type T1 = string & `${number}`; // `${number} +type T2 = string & `${bigint}`; // `${bigint} +type T3 = string & `${T}`; // `${T} +type T4 = string & `${Capitalize<`${T}`>}`; // `${Capitalize}` + +function f1(a: boolean[], x: `${number}`) { + let s = a[x]; // boolean +} + +function f2(a: boolean[], x: number | `${number}`) { + let s = a[x]; // boolean +} + +type T10 = boolean[][`${number}`]; // boolean +type T11 = boolean[][number | `${number}`]; // boolean + +type T20 = T; +type T21 = { [K in keyof T]: T20 }; + +type Container = { + value: T +} + +type UnwrapContainers[]> = { [K in keyof T]: T[K]['value'] }; + +declare function createContainer(value: T): Container; + +declare function f[]>(containers: [...T], callback: (...values: UnwrapContainers) => void): void; + +const container1 = createContainer('hi') +const container2 = createContainer(2) + +f([container1, container2], (value1, value2) => { + value1; // string + value2; // number +}); diff --git a/tests/cases/conformance/types/literal/templateLiteralTypes1.ts b/tests/cases/conformance/types/literal/templateLiteralTypes1.ts index daa3fbaeb78..0b11e9f5d61 100644 --- a/tests/cases/conformance/types/literal/templateLiteralTypes1.ts +++ b/tests/cases/conformance/types/literal/templateLiteralTypes1.ts @@ -219,6 +219,7 @@ type BB = AA<-2, -2>; // Repro from #40970 type PathKeys = + unknown extends T ? never : T extends readonly any[] ? Extract | SubKeys> : T extends object ? Extract | SubKeys> : never; diff --git a/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts b/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts index b77abb21dc9..d0f1703b113 100644 --- a/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts +++ b/tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @target: es2017 type Mapped1 = { [P in K]: { a: P } }; @@ -26,3 +27,25 @@ type Foo = { }; const get = (t: T, foo: Foo): T => foo[`get${t}`]; // Type 'Foo[`get${T}`]' is not assignable to type 'T' + +// Repro from #48626 + +interface Bounds { + min: number; + max: number; +} + +type NumericBoundsOf = { + [K in keyof T as T[K] extends number | undefined ? K : never]: Bounds; +} + +function validate(obj: T, bounds: NumericBoundsOf) { + for (const [key, val] of Object.entries(obj)) { + const boundsForKey = bounds[key as keyof NumericBoundsOf]; + if (boundsForKey) { + const { min, max } = boundsForKey; + if (min > val || max < val) return false; + } + } + return true; +} diff --git a/tests/cases/fourslash/autoImport_node12_node_modules1.ts b/tests/cases/fourslash/autoImport_node12_node_modules1.ts index 5020f5809b4..80a9e157311 100644 --- a/tests/cases/fourslash/autoImport_node12_node_modules1.ts +++ b/tests/cases/fourslash/autoImport_node12_node_modules1.ts @@ -1,6 +1,6 @@ /// -// @module: node12 +// @module: node16 // @Filename: /node_modules/undici/index.d.ts //// export function request(): any; diff --git a/tests/cases/fourslash/autoImportsNodeNext1.ts b/tests/cases/fourslash/autoImportsNodeNext1.ts new file mode 100644 index 00000000000..32aeaaef28d --- /dev/null +++ b/tests/cases/fourslash/autoImportsNodeNext1.ts @@ -0,0 +1,35 @@ +/// + +// @module: nodenext + +// @Filename: /node_modules/pack/package.json +//// { +//// "name": "pack", +//// "version": "1.0.0", +//// "exports": { +//// ".": "./main.mjs" +//// } +//// } + +// @Filename: /node_modules/pack/main.d.mts +//// import {} from "./unreachable.mjs"; +//// export const fromMain = 0; + +// @Filename: /node_modules/pack/unreachable.d.mts +//// export const fromUnreachable = 0; + +// @Filename: /index.mts +//// import { fromMain } from "pack"; +//// fromUnreachable/**/ + +goTo.marker(""); +verify.importFixAtPosition([]); + +verify.completions({ + marker: "", + excludes: ["fromUnreachable"], + preferences: { + includeCompletionsForModuleExports: true, + allowIncompleteCompletions: false, + } +}); diff --git a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.1.ts b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.1.ts index 417506a510c..42b4e07f4a6 100644 --- a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.1.ts +++ b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.1.ts @@ -9,7 +9,7 @@ ////const p1 = new Promise(resolve => resolve()); verify.codeFix({ - errorCode: 2794, + errorCode: 2810, description: "Add 'void' to Promise resolved without a value", index: 2, newFileContent: `const p1 = /** @type {Promise} */(new Promise(resolve => resolve()));` diff --git a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.2.ts b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.2.ts index f3bdbb635fe..d6d8a6ed9c3 100644 --- a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.2.ts +++ b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.2.ts @@ -9,7 +9,7 @@ ////const p2 = /** @type {Promise} */(new Promise(resolve => resolve())); verify.codeFix({ - errorCode: 2794, + errorCode: 2810, description: "Add 'void' to Promise resolved without a value", index: 2, newFileContent: `const p2 = /** @type {Promise} */(new Promise(resolve => resolve()));` diff --git a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.3.ts b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.3.ts index 92adfb610db..59aa8f45e9b 100644 --- a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.3.ts +++ b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.3.ts @@ -9,7 +9,7 @@ ////const p3 = /** @type {Promise} */(new Promise(resolve => resolve())); verify.codeFix({ - errorCode: 2794, + errorCode: 2810, description: "Add 'void' to Promise resolved without a value", index: 2, newFileContent: `const p3 = /** @type {Promise} */(new Promise(resolve => resolve()));` diff --git a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.4.ts b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.4.ts index 171e1135d1a..7985d9febc8 100644 --- a/tests/cases/fourslash/codeFixAddVoidToPromiseJS.4.ts +++ b/tests/cases/fourslash/codeFixAddVoidToPromiseJS.4.ts @@ -9,7 +9,7 @@ ////const p4 = /** @type {Promise<{ x: number } & { y: string }>} */(new Promise(resolve => resolve())); verify.codeFix({ - errorCode: 2794, + errorCode: 2810, description: "Add 'void' to Promise resolved without a value", index: 2, newFileContent: `const p4 = /** @type {Promise<({ x: number } & { y: string }) | void>} */(new Promise(resolve => resolve()));` diff --git a/tests/cases/fourslash/completionListInObjectBindingPattern16.ts b/tests/cases/fourslash/completionListInObjectBindingPattern16.ts new file mode 100644 index 00000000000..87e534182d7 --- /dev/null +++ b/tests/cases/fourslash/completionListInObjectBindingPattern16.ts @@ -0,0 +1,18 @@ +/// + +// @allowJs: true +// @checkJs: true + +// @filename: a.js +/////** +//// * @typedef Foo +//// * @property {number} a +//// * @property {string} b +//// */ +//// +/////** +//// * @param {Foo} options +//// */ +////function f({ /**/ }) {} + +verify.completions({ marker: "", exact: ["a", "b"] }); diff --git a/tests/cases/fourslash/completionListInObjectLiteral8.ts b/tests/cases/fourslash/completionListInObjectLiteral8.ts new file mode 100644 index 00000000000..11b8a1844d4 --- /dev/null +++ b/tests/cases/fourslash/completionListInObjectLiteral8.ts @@ -0,0 +1,18 @@ +/// + +////declare function test< +//// Variants extends Partial>, +////>(v: Variants): void +//// +////test({ +//// hover: "", +//// /**/ +////}); + +verify.completions({ + marker: '', + exact: [{ + name: 'pressed', + sortText: completion.SortText.OptionalMember + }] +}); diff --git a/tests/cases/fourslash/completionsImport_preferUpdatingExistingImport.ts b/tests/cases/fourslash/completionsImport_preferUpdatingExistingImport.ts new file mode 100644 index 00000000000..14933e083a9 --- /dev/null +++ b/tests/cases/fourslash/completionsImport_preferUpdatingExistingImport.ts @@ -0,0 +1,31 @@ +/// + +// @module: commonjs + +// @Filename: /deep/module/why/you/want/this/path.ts +//// export const x = 0; +//// export const y = 1; + +// @Filename: /nice/reexport.ts +//// import { x, y } from "../deep/module/why/you/want/this/path"; +//// export { x, y }; + +// @Filename: /index.ts +//// import { x } from "./deep/module/why/you/want/this/path"; +//// +//// y/**/ + +verify.completions({ + marker: "", + exact: completion.globalsPlus(["x", { + name: "y", + source: "./deep/module/why/you/want/this/path", + sourceDisplay: "./deep/module/why/you/want/this/path", + sortText: completion.SortText.AutoImportSuggestions, + hasAction: true, + }]), + preferences: { + includeCompletionsForModuleExports: true, + allowIncompleteCompletions: true, + }, +}); diff --git a/tests/cases/fourslash/completionsLiteralMatchingGenericSignature.ts b/tests/cases/fourslash/completionsLiteralMatchingGenericSignature.ts new file mode 100644 index 00000000000..85e44adf14a --- /dev/null +++ b/tests/cases/fourslash/completionsLiteralMatchingGenericSignature.ts @@ -0,0 +1,9 @@ +/// + +// @Filename: /a.tsx +//// declare function bar1

(p: P): void; +//// +//// bar1("/*ts*/") +//// + +verify.completions({ marker: ["ts"], exact: ["", "bar", "baz"] }); diff --git a/tests/cases/fourslash/completionsOverridingMethod2.ts b/tests/cases/fourslash/completionsOverridingMethod2.ts index 4abdbfa2707..4fc36685405 100644 --- a/tests/cases/fourslash/completionsOverridingMethod2.ts +++ b/tests/cases/fourslash/completionsOverridingMethod2.ts @@ -5,6 +5,9 @@ // Case: Snippet text needs escaping ////interface DollarSign { //// "$usd"(a: number): number; +//// $cad(b: number): number; +//// cla$$y(c: number): number; +//// isDollarAmountString(s: string): s is `$${number}` ////} ////class USD implements DollarSign { //// /*a*/ @@ -25,6 +28,24 @@ verify.completions({ sortText: completion.SortText.ClassMemberSnippets, isSnippet: true, insertText: "\"\\$usd\"(a: number): number {\n $0\n}", - } + }, + { + name: "$cad", + sortText: completion.SortText.ClassMemberSnippets, + isSnippet: true, + insertText: "\\$cad(b: number): number {\n $0\n}", + }, + { + name: "cla$$y", + sortText: completion.SortText.ClassMemberSnippets, + isSnippet: true, + insertText: "cla\\$\\$y(c: number): number {\n $0\n}", + }, + { + name: "isDollarAmountString", + sortText: completion.SortText.ClassMemberSnippets, + isSnippet: true, + insertText: "isDollarAmountString(s: string): s is `\\$\\${number}` {\n $0\n}" + }, ], }); \ No newline at end of file diff --git a/tests/cases/fourslash/documentHighlightInKeyword.ts b/tests/cases/fourslash/documentHighlightInKeyword.ts new file mode 100644 index 00000000000..b24d5827eca --- /dev/null +++ b/tests/cases/fourslash/documentHighlightInKeyword.ts @@ -0,0 +1,13 @@ +/// + +////export type Foo = { +//// [K [|in|] keyof T]: any; +////} +//// +////"a" [|in|] {}; +//// +////for (let a [|in|] {}) {} + +for (let range of test.ranges()) { + verify.noDocumentHighlights(range); +} diff --git a/tests/cases/fourslash/formatAfterPasteInString.ts b/tests/cases/fourslash/formatAfterPasteInString.ts new file mode 100644 index 00000000000..716af9183bb --- /dev/null +++ b/tests/cases/fourslash/formatAfterPasteInString.ts @@ -0,0 +1,9 @@ +/// + +//// /*2*/const x = f('aa/*1*/a').x() + +goTo.marker('1'); +edit.paste("bb"); +format.document(); +goTo.marker('2'); +verify.currentLineContentIs("const x = f('aabba').x()"); diff --git a/tests/cases/fourslash/formatV8Directive.ts b/tests/cases/fourslash/formatV8Directive.ts new file mode 100644 index 00000000000..515ef57c7ca --- /dev/null +++ b/tests/cases/fourslash/formatV8Directive.ts @@ -0,0 +1,7 @@ +/// +// @Filename: foo.js +//// function foo() {} +//// /*1*/%PrepareFunctionForOptimization(foo)/*2*/; + +// Don't really care what it does beyond not crashing +format.selection("1", "2"); diff --git a/tests/cases/fourslash/goToDefinitionImportMeta.ts b/tests/cases/fourslash/goToDefinitionImportMeta.ts index 4594fef1b67..723d9208b88 100644 --- a/tests/cases/fourslash/goToDefinitionImportMeta.ts +++ b/tests/cases/fourslash/goToDefinitionImportMeta.ts @@ -11,3 +11,5 @@ ////} verify.goToDefinition("reference", []); + +verify.noErrors(); \ No newline at end of file diff --git a/tests/cases/fourslash/jsTagAfterCallback1.ts b/tests/cases/fourslash/jsTagAfterCallback1.ts new file mode 100644 index 00000000000..cc270afcf39 --- /dev/null +++ b/tests/cases/fourslash/jsTagAfterCallback1.ts @@ -0,0 +1,19 @@ +/// +// @Filename: foo.js +// @allowJs: true +// @checkJs: true +//// /** @callback Listener @yeturn {ListenerBlock} */ +//// /** +//// * The function used +//// * /*1*/ settings +//// */ +//// class /*2*/ListenerBlock { +//// } + +// Force a syntax tree to be created. +verify.noMatchingBracePositionInCurrentFile(0); + +goTo.marker('1'); +edit.insert('fenster'); + +verify.quickInfoAt('2', 'class ListenerBlock', 'The function used\nfenster settings') diff --git a/tests/cases/fourslash/jsTagAfterCallback2.ts b/tests/cases/fourslash/jsTagAfterCallback2.ts new file mode 100644 index 00000000000..3cfa493f32a --- /dev/null +++ b/tests/cases/fourslash/jsTagAfterCallback2.ts @@ -0,0 +1,19 @@ +/// +// @Filename: foo.js +// @allowJs: true +// @checkJs: true +//// /** @callback Listener @param x @yeturn {ListenerBlock} */ +//// /** +//// * The function used +//// * /*1*/ settings +//// */ +//// class /*2*/ListenerBlock { +//// } + +// Force a syntax tree to be created. +verify.noMatchingBracePositionInCurrentFile(0); + +goTo.marker('1'); +edit.insert('fenster'); + +verify.quickInfoAt('2', 'class ListenerBlock', 'The function used\nfenster settings') diff --git a/tests/cases/fourslash/jsTagAfterTypedef1.ts b/tests/cases/fourslash/jsTagAfterTypedef1.ts new file mode 100644 index 00000000000..d0cf99e6f18 --- /dev/null +++ b/tests/cases/fourslash/jsTagAfterTypedef1.ts @@ -0,0 +1,19 @@ +/// +// @Filename: foo.js +// @allowJs: true +// @checkJs: true +//// /** @typedef Lister @property p @yeturn {ListenerBlock} */ +//// /** +//// * The function used +//// * /*1*/ settings +//// */ +//// class /*2*/ListenerBlock { +//// } + +// Force a syntax tree to be created. +verify.noMatchingBracePositionInCurrentFile(0); + +goTo.marker('1'); +edit.insert('fenster'); + +verify.quickInfoAt('2', 'class ListenerBlock', 'The function used\nfenster settings') diff --git a/tests/cases/fourslash/moduleNodeNextImportFix.ts b/tests/cases/fourslash/moduleNodeNextImportFix.ts index 74edf7daff3..19b2aa291e1 100644 --- a/tests/cases/fourslash/moduleNodeNextImportFix.ts +++ b/tests/cases/fourslash/moduleNodeNextImportFix.ts @@ -8,7 +8,7 @@ ////{ //// "compilerOptions": { //// "outDir": "./dist", -//// "module": "node12", +//// "module": "node16", //// "target": "esnext" //// }, //// "include": ["./src"] diff --git a/tests/cases/fourslash/organizeImports10.ts b/tests/cases/fourslash/organizeImports10.ts new file mode 100644 index 00000000000..de1acf551ee --- /dev/null +++ b/tests/cases/fourslash/organizeImports10.ts @@ -0,0 +1,18 @@ +/// + +// @Filename: /module.ts +////import type { ZodType } from './declaration'; +//// +/////** Intended to be used in combination with {@link ZodType} */ +////export function fun() { /* ... */ } + +// @Filename: /declaration.ts +//// type ZodType = {}; +//// export type { ZodType } + + +verify.organizeImports(`import type { ZodType } from './declaration'; + +/** Intended to be used in combination with {@link ZodType} */ +export function fun() { /* ... */ }` +); diff --git a/tests/cases/fourslash/organizeImports11.ts b/tests/cases/fourslash/organizeImports11.ts new file mode 100644 index 00000000000..d2ba946ef82 --- /dev/null +++ b/tests/cases/fourslash/organizeImports11.ts @@ -0,0 +1,62 @@ +/// + +// @Filename: /test.ts +////import { TypeA, TypeB, TypeC, UnreferencedType } from './my-types'; +//// +/////** +//// * MyClass {@link TypeA} +//// */ +////export class MyClass { +//// +//// /** +//// * Some Property {@link TypeB} +//// */ +//// public something; +//// +//// /** +//// * Some function {@link TypeC} +//// */ +//// public myMethod() { +//// +//// /** +//// * Some lambda function {@link TypeC} +//// */ +//// const someFunction = () => { +//// return ''; +//// } +//// someFunction(); +//// } +////} + +// @Filename: /my-types.ts +//// export type TypeA = string; +//// export class TypeB { } +//// export type TypeC = () => string; + +verify.organizeImports(`import { TypeA, TypeB, TypeC } from './my-types'; + +/** + * MyClass {@link TypeA} + */ +export class MyClass { + + /** + * Some Property {@link TypeB} + */ + public something; + + /** + * Some function {@link TypeC} + */ + public myMethod() { + + /** + * Some lambda function {@link TypeC} + */ + const someFunction = () => { + return ''; + } + someFunction(); + } +}` +); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoFunctionCheckType.ts b/tests/cases/fourslash/quickInfoFunctionCheckType.ts new file mode 100644 index 00000000000..813b920db3b --- /dev/null +++ b/tests/cases/fourslash/quickInfoFunctionCheckType.ts @@ -0,0 +1,6 @@ +/// + +////export type /**/Tail = ((...t: T) => void) extends (h: any, ...rest: infer R) => void ? R : never; + +verify.quickInfoAt("", "type Tail = ((...t: T) => void) extends (h: any, ...rest: infer R) => void ? R : never"); + diff --git a/tests/cases/fourslash/refactorConvertToEsModule_module_node12.ts b/tests/cases/fourslash/refactorConvertToEsModule_module_node12.ts index a7be99ba157..475fc0f5c53 100644 --- a/tests/cases/fourslash/refactorConvertToEsModule_module_node12.ts +++ b/tests/cases/fourslash/refactorConvertToEsModule_module_node12.ts @@ -2,7 +2,7 @@ // @allowJs: true // @target: esnext -// @module: node12 +// @module: node16 // @Filename: /a.js ////module.exports = 0; diff --git a/tests/cases/fourslash/server/autoImportProvider_exportMap3.ts b/tests/cases/fourslash/server/autoImportProvider_exportMap3.ts index e4e70c749fe..b31bc52cb69 100644 --- a/tests/cases/fourslash/server/autoImportProvider_exportMap3.ts +++ b/tests/cases/fourslash/server/autoImportProvider_exportMap3.ts @@ -39,16 +39,6 @@ goTo.marker(""); verify.completions({ marker: "", exact: completion.globalsPlus([{ - // TODO: We should filter this one out due to its bad module specifier, - // but we don't know it's going to be filtered out until we actually - // resolve the module specifier, which is a problem for completions - // that don't have their module specifiers eagerly resolved. - name: "fooFromIndex", - source: "../node_modules/dependency/lib/index.js", - sourceDisplay: "../node_modules/dependency/lib/index.js", - sortText: completion.SortText.AutoImportSuggestions, - hasAction: true, - }, { name: "fooFromLol", source: "dependency", sourceDisplay: "dependency", diff --git a/tests/cases/fourslash/server/autoImportProvider_exportMap8.ts b/tests/cases/fourslash/server/autoImportProvider_exportMap8.ts index b679c2184fd..cdee1fe7cc8 100644 --- a/tests/cases/fourslash/server/autoImportProvider_exportMap8.ts +++ b/tests/cases/fourslash/server/autoImportProvider_exportMap8.ts @@ -49,13 +49,6 @@ goTo.marker("cts"); verify.completions({ marker: "cts", exact: completion.globalsPlus([{ - // TODO: this one will go away (see note in ./autoImportProvider_exportMap3.ts) - name: "fooFromIndex", - source: "../node_modules/dependency/lib/index", - sourceDisplay: "../node_modules/dependency/lib/index", - sortText: completion.SortText.AutoImportSuggestions, - hasAction: true, - }, { name: "fooFromLol", source: "dependency/lol", sourceDisplay: "dependency/lol", @@ -78,13 +71,6 @@ verify.completions({ sourceDisplay: "dependency/lol", sortText: completion.SortText.AutoImportSuggestions, hasAction: true, - }, { - // TODO: this one will go away (see note in ./autoImportProvider_exportMap3.ts) - name: "fooFromLol", - source: "../node_modules/dependency/lib/lol.js", - sourceDisplay: "../node_modules/dependency/lib/lol.js", - sortText: completion.SortText.AutoImportSuggestions, - hasAction: true, }]), preferences: { includeCompletionsForModuleExports: true, diff --git a/tests/cases/fourslash/server/autoImportProvider_namespaceSameNameAsIntrinsic.ts b/tests/cases/fourslash/server/autoImportProvider_namespaceSameNameAsIntrinsic.ts new file mode 100644 index 00000000000..f4c6342f44e --- /dev/null +++ b/tests/cases/fourslash/server/autoImportProvider_namespaceSameNameAsIntrinsic.ts @@ -0,0 +1,39 @@ +/// + +// @Filename: /node_modules/fp-ts/package.json +//// { "name": "fp-ts", "version": "0.10.4" } + +// @Filename: /node_modules/fp-ts/index.d.ts +//// export * as string from "./lib/string"; + +// @Filename: /node_modules/fp-ts/lib/string.d.ts +//// export declare const fromString: (s: string) => string; +//// export type SafeString = string; + +// @Filename: /package.json +//// { "dependencies": { "fp-ts": "^0.10.4" } } + +// @Filename: /tsconfig.json +//// { "compilerOptions": { "module": "commonjs" } } + +// @Filename: /index.ts +//// type A = { name: string/**/ } + +goTo.marker(""); +verify.completions({ + marker: "", + includes: [{ + name: "string", + sortText: completion.SortText.GlobalsOrKeywords, + }, { + name: "string", + sortText: completion.SortText.AutoImportSuggestions, + source: "fp-ts", + sourceDisplay: "fp-ts", + hasAction: true, + }], + preferences: { + includeCompletionsForModuleExports: true, + allowIncompleteCompletions: true, + }, +}); diff --git a/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts b/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts new file mode 100644 index 00000000000..cf21c74c2d5 --- /dev/null +++ b/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts @@ -0,0 +1,5 @@ +/// + +////const str: string = "hello/*1*/"; + +verify.baselineFindAllReferences('1') diff --git a/tests/cases/fourslash/server/renameNamedImport.ts b/tests/cases/fourslash/server/renameNamedImport.ts new file mode 100644 index 00000000000..07ae2b93c8b --- /dev/null +++ b/tests/cases/fourslash/server/renameNamedImport.ts @@ -0,0 +1,22 @@ +/// + +// @Filename: /lib/tsconfig.json +//// {} + +// @Filename: /lib/index.ts +//// const unrelatedLocalVariable = 123; +//// export const someExportedVariable = unrelatedLocalVariable; + +// @Filename: /src/tsconfig.json +//// {} + +// @Filename: /src/index.ts +//// import { /*i*/someExportedVariable } from '../lib/index'; +//// someExportedVariable; + +// @Filename: /tsconfig.json +//// {} + +goTo.file("/lib/index.ts"); +goTo.file("/src/index.ts"); +verify.baselineRename("i", { providePrefixAndSuffixTextForRename: true }); diff --git a/tests/cases/fourslash/server/renameNamespaceImport.ts b/tests/cases/fourslash/server/renameNamespaceImport.ts new file mode 100644 index 00000000000..a4b98baa01c --- /dev/null +++ b/tests/cases/fourslash/server/renameNamespaceImport.ts @@ -0,0 +1,22 @@ +/// + +// @Filename: /lib/tsconfig.json +//// {} + +// @Filename: /lib/index.ts +//// const unrelatedLocalVariable = 123; +//// export const someExportedVariable = unrelatedLocalVariable; + +// @Filename: /src/tsconfig.json +//// {} + +// @Filename: /src/index.ts +//// import * as /*i*/lib from '../lib/index'; +//// lib.someExportedVariable; + +// @Filename: /tsconfig.json +//// {} + +goTo.file("/lib/index.ts"); +goTo.file("/src/index.ts"); +verify.baselineRename("i", {});