From 348dddc80a2d6c63388c0b63628c519289416b98 Mon Sep 17 00:00:00 2001 From: Lorenzo Dalla Vecchia Date: Sun, 7 Feb 2021 17:24:36 +0100 Subject: [PATCH] Include standard webpack start/end locations in emitted errors --- CHANGELOG.md | 3 + package.json | 2 +- src/interfaces.ts | 15 ++++- src/utils.ts | 64 +++++++++++++++---- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../colors/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-transpile-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 4 +- .../expectedOutput-4.1/output.txt | 4 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../errors/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-transpile-4.1/output.txt | 2 +- .../es3/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch1/output.txt | 2 +- .../nolib/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../production/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch3/output.txt | 2 +- .../expectedOutput-4.1/patch5/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch4/output.txt | 2 +- .../expectedOutput-4.1/patch4/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/patch2/output.txt | 4 +- .../expectedOutput-4.1/patch4/output.txt | 2 +- .../expectedOutput-4.1/patch2/output.txt | 4 +- .../expectedOutput-4.1/patch4/output.txt | 2 +- .../expectedOutput-4.1/patch2/output.txt | 4 +- .../expectedOutput-4.1/patch4/output.txt | 2 +- .../reportFiles/expectedOutput-4.1/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- .../expectedOutput-4.1/patch0/output.txt | 2 +- 49 files changed, 121 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe811fa87..96b67abfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## v8.0.17 +* [Included correct webpack source location in emitted errors](https://github.com/TypeStrong/ts-loader/issues/1199) - thanks @lorenzodallavecchia + ## v8.0.16 * [Re-Fixed missing errors in watch mode in webpack5](https://github.com/TypeStrong/ts-loader/issues/1204) - thanks @appzuka diff --git a/package.json b/package.json index 2b31163b2..c13d40f41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "8.0.16", + "version": "8.0.17", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", diff --git a/src/interfaces.ts b/src/interfaces.ts index 53c48423f..fb7643e44 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -13,12 +13,25 @@ export interface ErrorInfo { context: string; } -export type FileLocation = { line: number; character: number }; +export type FileLocation = { + /** 1-based */ + line: number; + /** 1-based */ + character: number; +}; +export type WebpackSourcePosition = { + /** 1-based */ + line: number; + /** 0-based */ + column?: number; +}; export interface WebpackError { module?: any; file?: string; message: string; + loc?: { start: WebpackSourcePosition; end?: WebpackSourcePosition }; + /* ts-loader extra properties */ location?: FileLocation; loaderSource: string; } diff --git a/src/utils.ts b/src/utils.ts index c1da3e0a2..4974619c0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,6 +7,7 @@ import * as typescript from 'typescript'; import constants = require('./constants'); import { ErrorInfo, + FileLocation, FilePathKey, LoaderOptions, ResolvedModule, @@ -15,6 +16,7 @@ import { TSInstance, WebpackError, WebpackModule, + WebpackSourcePosition, } from './interfaces'; import { getInputFileNameFromOutput } from './instances'; /** @@ -75,10 +77,10 @@ export function formatErrors( }) .map(diagnostic => { const file = diagnostic.file; - const position = - file === undefined - ? undefined - : file.getLineAndCharacterOfPosition(diagnostic.start!); + const { start, end } = + file === undefined || diagnostic.start === undefined + ? { start: undefined, end: undefined } + : getFileLocations(file, diagnostic.start, diagnostic.length); const errorInfo: ErrorInfo = { code: diagnostic.code, severity: compiler.DiagnosticCategory[ @@ -89,8 +91,8 @@ export function formatErrors( constants.EOL ), file: file === undefined ? '' : path.normalize(file.fileName), - line: position === undefined ? 0 : position.line + 1, - character: position === undefined ? 0 : position.character + 1, + line: start === undefined ? 0 : start.line, + character: start === undefined ? 0 : start.character, context, }; @@ -103,15 +105,35 @@ export function formatErrors( loaderOptions, message, merge.file === undefined ? errorInfo.file : merge.file, - position === undefined - ? undefined - : { line: errorInfo.line, character: errorInfo.character } + start, + end ); return Object.assign(error, merge) as WebpackError; }); } +function getFileLocations( + file: typescript.SourceFile, + position: number, + length = 0 +) { + const startLC = file.getLineAndCharacterOfPosition(position); + const start: FileLocation = { + line: startLC.line + 1, + character: startLC.character + 1, + }; + const endLC = + length > 0 + ? file.getLineAndCharacterOfPosition(position + length) + : undefined; + const end: FileLocation | undefined = + endLC === undefined + ? undefined + : { line: endLC.line + 1, character: endLC.character + 1 }; + return { start, end }; +} + export function fsReadFile( fileName: string, encoding: string | undefined = 'utf8' @@ -128,16 +150,36 @@ export function makeError( loaderOptions: LoaderOptions, message: string, file: string | undefined, - location?: { line: number; character: number } + location?: FileLocation, + endLocation?: FileLocation ): WebpackError { return { message, - location, file, + loc: + location === undefined + ? undefined + : makeWebpackLocation(location, endLocation), + location, loaderSource: tsLoaderSource(loaderOptions), }; } +function makeWebpackLocation( + location: FileLocation, + endLocation?: FileLocation +) { + const start: WebpackSourcePosition = { + line: location.line, + column: location.character - 1, + }; + const end: WebpackSourcePosition | undefined = + endLocation === undefined + ? undefined + : { line: endLocation.line, column: endLocation.character - 1 }; + return { start, end }; +} + export function tsLoaderSource(loaderOptions: LoaderOptions) { return `ts-loader-${loaderOptions.instance}`; } diff --git a/test/comparison-tests/aliasResolution/expectedOutput-4.1/output.txt b/test/comparison-tests/aliasResolution/expectedOutput-4.1/output.txt index c0da8c1a3..718fff194 100644 --- a/test/comparison-tests/aliasResolution/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/aliasResolution/expectedOutput-4.1/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./common/components/myComponent.ts] 46 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 2:30-55 [tsl] ERROR in app.ts(2,31)  TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations. \ No newline at end of file diff --git a/test/comparison-tests/aliasResolution/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/aliasResolution/expectedOutput-4.1/patch0/output.txt index bf0ca3fd3..7c081f883 100644 --- a/test/comparison-tests/aliasResolution/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/aliasResolution/expectedOutput-4.1/patch0/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./common/components/myComponent.ts] 45 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 2:30-55 [tsl] ERROR in app.ts(2,31)  TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations. \ No newline at end of file diff --git a/test/comparison-tests/allowJs-ts-check/expectedOutput-4.1/output.txt b/test/comparison-tests/allowJs-ts-check/expectedOutput-4.1/output.txt index c978f9feb..c65bff5ac 100644 --- a/test/comparison-tests/allowJs-ts-check/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/allowJs-ts-check/expectedOutput-4.1/output.txt @@ -6,6 +6,6 @@ Entrypoint main = bundle.js [./src/index.js] 207 bytes {main} [built] ERROR in src/error2.js -./src/error2.js +./src/error2.js 4:9-12 [tsl] ERROR in src/error2.js(4,10)  TS2339: Property 'bar' does not exist on type 'Class2'. \ No newline at end of file diff --git a/test/comparison-tests/basic/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/basic/expectedOutput-4.1/patch0/output.txt index 9fac8da0d..a8db6db09 100644 --- a/test/comparison-tests/basic/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/basic/expectedOutput-4.1/patch0/output.txt @@ -6,6 +6,6 @@ Entrypoint main = bundle.js [./submodule/submodule.ts] 149 bytes {main} ERROR in app.ts -./app.ts +./app.ts 3:12-24 [tsl] ERROR in app.ts(3,13)  TS2551: Property 'doSomething2' does not exist on type 'typeof externalLib'. Did you mean 'doSomething'? \ No newline at end of file diff --git a/test/comparison-tests/colors/expectedOutput-4.1/output.txt b/test/comparison-tests/colors/expectedOutput-4.1/output.txt index 117027d85..613a362fe 100644 --- a/test/comparison-tests/colors/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/colors/expectedOutput-4.1/output.txt @@ -13,6 +13,6 @@ You may need an additional loader to handle the result of these loaders. | ERROR in app.ts -./app.ts +./app.ts 1:6-8 [tsl] ERROR in app.ts(1,7) TS1005: ',' expected. \ No newline at end of file diff --git a/test/comparison-tests/colors/expectedOutput-transpile-4.1/output.txt b/test/comparison-tests/colors/expectedOutput-transpile-4.1/output.txt index 117027d85..613a362fe 100644 --- a/test/comparison-tests/colors/expectedOutput-transpile-4.1/output.txt +++ b/test/comparison-tests/colors/expectedOutput-transpile-4.1/output.txt @@ -13,6 +13,6 @@ You may need an additional loader to handle the result of these loaders. | ERROR in app.ts -./app.ts +./app.ts 1:6-8 [tsl] ERROR in app.ts(1,7) TS1005: ',' expected. \ No newline at end of file diff --git a/test/comparison-tests/declarationDeps/expectedOutput-4.1/output.txt b/test/comparison-tests/declarationDeps/expectedOutput-4.1/output.txt index 31af3d0b6..b8e99c377 100644 --- a/test/comparison-tests/declarationDeps/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/declarationDeps/expectedOutput-4.1/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [./app.ts] 41 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 2:6-11 [tsl] ERROR in app.ts(2,7)  TS2339: Property 'sayHi' does not exist on type 'typeof Hello'. \ No newline at end of file diff --git a/test/comparison-tests/declarationWatch/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/declarationWatch/expectedOutput-4.1/patch0/output.txt index f818ddc7c..b6e14df72 100644 --- a/test/comparison-tests/declarationWatch/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/declarationWatch/expectedOutput-4.1/patch0/output.txt @@ -5,11 +5,11 @@ Entrypoint main = bundle.js [./dep.ts] 59 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 5:6-17 [tsl] ERROR in app.ts(5,7)  TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. ERROR in dep.ts -./dep.ts +./dep.ts 1:6-17 [tsl] ERROR in dep.ts(1,7)  TS2339: Property 'doSomething' does not exist on type 'typeof Thing'. \ No newline at end of file diff --git a/test/comparison-tests/dependencyErrors/expectedOutput-4.1/output.txt b/test/comparison-tests/dependencyErrors/expectedOutput-4.1/output.txt index 9bf366413..ca6be6cde 100644 --- a/test/comparison-tests/dependencyErrors/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/dependencyErrors/expectedOutput-4.1/output.txt @@ -6,11 +6,11 @@ Entrypoint main = bundle.js [./dep2.ts] 76 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 4:5-7 [tsl] ERROR in app.ts(4,6)  TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ERROR in app.ts -./app.ts +./app.ts 5:5-7 [tsl] ERROR in app.ts(5,6)  TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/dependencyErrors/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/dependencyErrors/expectedOutput-4.1/patch0/output.txt index f4ea07b34..82b969098 100644 --- a/test/comparison-tests/dependencyErrors/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/dependencyErrors/expectedOutput-4.1/patch0/output.txt @@ -6,6 +6,6 @@ Entrypoint main = bundle.js [./dep2.ts] 76 bytes {main} ERROR in app.ts -./app.ts +./app.ts 5:5-7 [tsl] ERROR in app.ts(5,6)  TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/errorFormatter/expectedOutput-4.1/output.txt b/test/comparison-tests/errorFormatter/expectedOutput-4.1/output.txt index ce9b05006..d023ac4c6 100644 --- a/test/comparison-tests/errorFormatter/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/errorFormatter/expectedOutput-4.1/output.txt @@ -5,5 +5,5 @@ Entrypoint main = bundle.js [./common/components/myComponent.ts] 46 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 2:30-55 Does not compute.... code: 2307,severity: error,content: Cannot find module 'components/myComponent2' or its corresponding type declarations.,file: app.ts,line: 2,character: 31,context: .test/errorFormatter \ No newline at end of file diff --git a/test/comparison-tests/errors/expectedOutput-4.1/output.txt b/test/comparison-tests/errors/expectedOutput-4.1/output.txt index c48ec99d2..07aed0162 100644 --- a/test/comparison-tests/errors/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/errors/expectedOutput-4.1/output.txt @@ -13,6 +13,6 @@ You may need an additional loader to handle the result of these loaders. | ERROR in app.ts -./app.ts +./app.ts 1:6-8 [tsl] ERROR in app.ts(1,7)  TS1005: ',' expected. \ No newline at end of file diff --git a/test/comparison-tests/errors/expectedOutput-transpile-4.1/output.txt b/test/comparison-tests/errors/expectedOutput-transpile-4.1/output.txt index ffab7fca9..96bc80dea 100644 --- a/test/comparison-tests/errors/expectedOutput-transpile-4.1/output.txt +++ b/test/comparison-tests/errors/expectedOutput-transpile-4.1/output.txt @@ -4,7 +4,7 @@ Entrypoint main = bundle.js [./app.ts] 220 bytes {main} [built] [failed] [2 errors] ERROR in app.ts -./app.ts +./app.ts 1:6-8 [tsl] ERROR in app.ts(1,7)  TS1005: ',' expected. diff --git a/test/comparison-tests/es3/expectedOutput-4.1/output.txt b/test/comparison-tests/es3/expectedOutput-4.1/output.txt index 12a3418dd..fe96190e5 100644 --- a/test/comparison-tests/es3/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/es3/expectedOutput-4.1/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [./app.ts] 29 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 1:6-7 [tsl] ERROR in app.ts(1,7)  TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/test/comparison-tests/ignoreDiagnostics/expectedOutput-4.1/output.txt b/test/comparison-tests/ignoreDiagnostics/expectedOutput-4.1/output.txt index bcc531083..b42812bf2 100644 --- a/test/comparison-tests/ignoreDiagnostics/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/ignoreDiagnostics/expectedOutput-4.1/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [./app.ts] 278 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 9:4-5 [tsl] ERROR in app.ts(9,5)  TS2322: Type 'string' is not assignable to type 'Number'. \ No newline at end of file diff --git a/test/comparison-tests/importsWatch/expectedOutput-4.1/patch1/output.txt b/test/comparison-tests/importsWatch/expectedOutput-4.1/patch1/output.txt index 5773b734b..3e3ae7492 100644 --- a/test/comparison-tests/importsWatch/expectedOutput-4.1/patch1/output.txt +++ b/test/comparison-tests/importsWatch/expectedOutput-4.1/patch1/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [./app.ts] 70 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 4:0-7 [tsl] ERROR in app.ts(4,1)  TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/test/comparison-tests/nolib/expectedOutput-4.1/output.txt b/test/comparison-tests/nolib/expectedOutput-4.1/output.txt index 8c8e530d0..3dd528d24 100644 --- a/test/comparison-tests/nolib/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/nolib/expectedOutput-4.1/output.txt @@ -32,6 +32,6 @@ ERROR in tsconfig.json  TS2318: Cannot find global type 'RegExp'. ERROR in app.ts -./app.ts +./app.ts 1:0-8 [tsl] ERROR in app.ts(1,1)  TS2304: Cannot find name 'parseInt'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-4.1/patch0/output.txt index 9fac8da0d..a8db6db09 100644 --- a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-4.1/patch0/output.txt @@ -6,6 +6,6 @@ Entrypoint main = bundle.js [./submodule/submodule.ts] 149 bytes {main} ERROR in app.ts -./app.ts +./app.ts 3:12-24 [tsl] ERROR in app.ts(3,13)  TS2551: Property 'doSomething2' does not exist on type 'typeof externalLib'. Did you mean 'doSomething'? \ No newline at end of file diff --git a/test/comparison-tests/production/expectedOutput-4.1/output.txt b/test/comparison-tests/production/expectedOutput-4.1/output.txt index 63923ad42..22ce36262 100644 --- a/test/comparison-tests/production/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/production/expectedOutput-4.1/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [0] ./app.ts 27 bytes {0} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 4:0-1 [tsl] ERROR in app.ts(4,1)  TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch3/output.txt b/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch3/output.txt index cbffd9cda..476620833 100644 --- a/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch3/output.txt +++ b/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch3/output.txt @@ -8,6 +8,6 @@ Entrypoint main = bundle.js [./app.ts] 202 bytes {main} [built] ERROR in common/index.ts -../common/index.ts +../common/index.ts 2:2-12 [tsl] ERROR in common/index.ts(2,3)  TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch5/output.txt b/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch5/output.txt index 47669f95b..e43aa5737 100644 --- a/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch5/output.txt +++ b/test/comparison-tests/projectReferencesMultipleDifferentInstance/expectedOutput-4.1/patch5/output.txt @@ -8,6 +8,6 @@ Entrypoint main = bundle.js [./app.ts] 202 bytes {main} [built] ERROR in utils/index.ts -../utils/index.ts +../utils/index.ts 5:35-50 [tsl] ERROR in utils/index.ts(5,36)  TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-4.1/output.txt index 67bf67e8a..a599e9eaa 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-4.1/output.txt @@ -9,6 +9,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 119 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:45-49 [tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-4.1/output.txt index 7d6aa5942..45a0fb029 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-4.1/output.txt @@ -11,6 +11,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 119 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:45-49 [tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-4.1/output.txt index 67bf67e8a..a599e9eaa 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-4.1/output.txt @@ -9,6 +9,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 119 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:45-49 [tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.1/output.txt index c74544a53..a3e0228f2 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.1/output.txt @@ -14,6 +14,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:6-7 [tsl] ERROR in lib/index.ts(6,7)  TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt index 5eb8fe6c7..d38f63610 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt @@ -16,6 +16,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:6-7 [tsl] ERROR in lib/index.ts(6,7)  TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.1/output.txt index 1d22977b8..3537c6c2d 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.1/output.txt @@ -14,6 +14,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:6-7 [tsl] ERROR in lib/index.ts(6,7)  TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.1/output.txt index f190e2fea..c0a20cfc7 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.1/output.txt @@ -13,6 +13,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 4:11-12 [tsl] ERROR in lib/index.ts(4,12)  TS1136: Property assignment expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt index 98fa4b8a7..d457d4f0d 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.1/output.txt @@ -15,6 +15,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 4:11-12 [tsl] ERROR in lib/index.ts(4,12)  TS1136: Property assignment expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.1/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.1/output.txt index aaf4f848a..56edf71ed 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.1/output.txt @@ -13,6 +13,6 @@ Error: TypeScript emitted no output for lib/index.ts. The most common cause for @ ./app.ts 3:12-28 ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 4:11-12 [tsl] ERROR in lib/index.ts(4,12)  TS1136: Property assignment expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-4.1/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-4.1/patch4/output.txt index 2d914655a..6797170be 100644 --- a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-4.1/patch4/output.txt +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-4.1/patch4/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./lib/out/index.js] 178 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:55-60 [tsl] ERROR in app.ts(3,56)  TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-4.1/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-4.1/patch4/output.txt index 2d914655a..6797170be 100644 --- a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-4.1/patch4/output.txt +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-4.1/patch4/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./lib/out/index.js] 178 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:55-60 [tsl] ERROR in app.ts(3,56)  TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesSymLinks/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/projectReferencesSymLinks/expectedOutput-4.1/patch0/output.txt index aa1e397cc..86ba1eac3 100644 --- a/test/comparison-tests/projectReferencesSymLinks/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/projectReferencesSymLinks/expectedOutput-4.1/patch0/output.txt @@ -9,6 +9,6 @@ Entrypoint main = index.js [./src/index.ts] 108 bytes {main} [built] [1 error] ERROR in app/src/index.ts -./src/index.ts +./src/index.ts 1:9-25 [tsl] ERROR in app/src/index.ts(1,10)  TS2724: '"../../lib/dist"' has no exported member named 'getMeaningOfLife'. Did you mean 'getMeaningOfLife3'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesSymLinksPreserve/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/projectReferencesSymLinksPreserve/expectedOutput-4.1/patch0/output.txt index ce861ab73..c538b1de1 100644 --- a/test/comparison-tests/projectReferencesSymLinksPreserve/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/projectReferencesSymLinksPreserve/expectedOutput-4.1/patch0/output.txt @@ -9,6 +9,6 @@ Entrypoint main = index.js [./src/index.ts] 108 bytes {main} [built] [1 error] ERROR in app/src/index.ts -./src/index.ts +./src/index.ts 1:9-25 [tsl] ERROR in app/src/index.ts(1,10)  TS2724: '"../../node_modules/lib/dist"' has no exported member named 'getMeaningOfLife'. Did you mean 'getMeaningOfLife3'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesSymLinksPreserve_WatchApi/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/projectReferencesSymLinksPreserve_WatchApi/expectedOutput-4.1/patch0/output.txt index ce861ab73..c538b1de1 100644 --- a/test/comparison-tests/projectReferencesSymLinksPreserve_WatchApi/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/projectReferencesSymLinksPreserve_WatchApi/expectedOutput-4.1/patch0/output.txt @@ -9,6 +9,6 @@ Entrypoint main = index.js [./src/index.ts] 108 bytes {main} [built] [1 error] ERROR in app/src/index.ts -./src/index.ts +./src/index.ts 1:9-25 [tsl] ERROR in app/src/index.ts(1,10)  TS2724: '"../../node_modules/lib/dist"' has no exported member named 'getMeaningOfLife'. Did you mean 'getMeaningOfLife3'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesSymLinks_WatchApi/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/projectReferencesSymLinks_WatchApi/expectedOutput-4.1/patch0/output.txt index aa1e397cc..86ba1eac3 100644 --- a/test/comparison-tests/projectReferencesSymLinks_WatchApi/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/projectReferencesSymLinks_WatchApi/expectedOutput-4.1/patch0/output.txt @@ -9,6 +9,6 @@ Entrypoint main = index.js [./src/index.ts] 108 bytes {main} [built] [1 error] ERROR in app/src/index.ts -./src/index.ts +./src/index.ts 1:9-25 [tsl] ERROR in app/src/index.ts(1,10)  TS2724: '"../../lib/dist"' has no exported member named 'getMeaningOfLife'. Did you mean 'getMeaningOfLife3'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch2/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch2/output.txt index cdf7bfbc0..469ab45a1 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch2/output.txt @@ -5,11 +5,11 @@ Entrypoint main = bundle.js [./lib/index.ts] 150 bytes {main} [built] [2 errors] ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:2-3 [tsl] ERROR in lib/index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 7:0-1 [tsl] ERROR in lib/index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch4/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch4/output.txt index e5095f9ca..47da79ac4 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch4/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-4.1/patch4/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 145 bytes {main} ERROR in app.ts -./app.ts +./app.ts 3:55-60 [tsl] ERROR in app.ts(3,56)  TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch2/output.txt index 6eff0cd61..ba040527a 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch2/output.txt @@ -6,11 +6,11 @@ Entrypoint main = bundle.js [./lib/index.ts] 150 bytes {main} [built] [2 errors] ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:2-3 [tsl] ERROR in lib/index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 7:0-1 [tsl] ERROR in lib/index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch4/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch4/output.txt index 5367b0c7d..785c12da5 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch4/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-4.1/patch4/output.txt @@ -7,6 +7,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 145 bytes {main} ERROR in app.ts -./app.ts +./app.ts 3:55-60 [tsl] ERROR in app.ts(3,56)  TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch2/output.txt index cdf7bfbc0..469ab45a1 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch2/output.txt @@ -5,11 +5,11 @@ Entrypoint main = bundle.js [./lib/index.ts] 150 bytes {main} [built] [2 errors] ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 6:2-3 [tsl] ERROR in lib/index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib/index.ts -./lib/index.ts +./lib/index.ts 7:0-1 [tsl] ERROR in lib/index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch4/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch4/output.txt index e5095f9ca..47da79ac4 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch4/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-4.1/patch4/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./lib/index.ts] 145 bytes {main} ERROR in app.ts -./app.ts +./app.ts 3:55-60 [tsl] ERROR in app.ts(3,56)  TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/reportFiles/expectedOutput-4.1/output.txt b/test/comparison-tests/reportFiles/expectedOutput-4.1/output.txt index 5211bb195..3214b5189 100644 --- a/test/comparison-tests/reportFiles/expectedOutput-4.1/output.txt +++ b/test/comparison-tests/reportFiles/expectedOutput-4.1/output.txt @@ -5,6 +5,6 @@ Entrypoint main = bundle.js [./skip.ts] 79 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:0-1 [tsl] ERROR in app.ts(3,1)  TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/simpleDependency/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/simpleDependency/expectedOutput-4.1/patch0/output.txt index 0f981418b..584de80f1 100644 --- a/test/comparison-tests/simpleDependency/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/simpleDependency/expectedOutput-4.1/patch0/output.txt @@ -6,6 +6,6 @@ Entrypoint main = bundle.js [./dep.ts] 70 bytes {main} [built] ERROR in app.ts -./app.ts +./app.ts 3:4-6 [tsl] ERROR in app.ts(3,5)  TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/typeSystemWatch/expectedOutput-4.1/patch0/output.txt b/test/comparison-tests/typeSystemWatch/expectedOutput-4.1/patch0/output.txt index 3de8aa6e6..f2675eeee 100644 --- a/test/comparison-tests/typeSystemWatch/expectedOutput-4.1/patch0/output.txt +++ b/test/comparison-tests/typeSystemWatch/expectedOutput-4.1/patch0/output.txt @@ -4,6 +4,6 @@ Entrypoint main = bundle.js [./app.ts] 212 bytes {main} [built] [1 error] ERROR in app.ts -./app.ts +./app.ts 11:4-5 [tsl] ERROR in app.ts(11,5)  TS2741: Property 'b' is missing in type 'AType' but required in type 'BType'. \ No newline at end of file