From 75a4dfdfa8f1b78914bcf3e21656b0553b37144f Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 17 Sep 2022 23:30:18 +0000 Subject: [PATCH 01/15] resolve: Pass implied module kind to typescript --- src/servicesHost.ts | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 3cd9b550d..3e6c9f8b0 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -264,7 +264,9 @@ function makeResolvers( moduleNames: string[], containingFile: string, _reusedNames?: string[] | undefined, - redirectedReference?: typescript.ResolvedProjectReference | undefined + redirectedReference?: typescript.ResolvedProjectReference | undefined, + _?: typescript.CompilerOptions, + containingSourceFile?: typescript.SourceFile ): (typescript.ResolvedModule | undefined)[] => { const resolvedModules = moduleNames.map(moduleName => resolveModule( @@ -274,7 +276,8 @@ function makeResolvers( scriptRegex, moduleName, containingFile, - redirectedReference + redirectedReference, + containingSourceFile ) ); @@ -1249,7 +1252,8 @@ function resolveModule( scriptRegex: RegExp, moduleName: string, containingFile: string, - redirectedReference: typescript.ResolvedProjectReference | undefined + redirectedReference: typescript.ResolvedProjectReference | undefined, + containingSourceFile: typescript.SourceFile | undefined ) { let resolutionResult: ResolvedModule; @@ -1272,7 +1276,8 @@ function resolveModule( const tsResolution = resolveModuleName( moduleName, containingFile, - redirectedReference + redirectedReference, + containingSourceFile ); if (tsResolution.resolvedModule !== undefined) { const resolvedFileName = path.normalize( @@ -1297,7 +1302,8 @@ function resolveModule( type ResolveModuleName = ( moduleName: string, containingFile: string, - redirectedReference: typescript.ResolvedProjectReference | undefined + redirectedReference: typescript.ResolvedProjectReference | undefined, + containingSourceFile: typescript.SourceFile | undefined ) => typescript.ResolvedModuleWithFailedLookupLocations; function makeResolveModuleName( @@ -1314,14 +1320,20 @@ function makeResolveModuleName( moduleResolutionHost ); } - return (moduleName, containingFile, redirectedReference) => + return ( + moduleName, + containingFileName, + redirectedReference, + containingFile + ) => compiler.resolveModuleName( moduleName, - containingFile, + containingFileName, compilerOptions, moduleResolutionHost, instance.moduleResolutionCache, - redirectedReference + redirectedReference, + containingFile?.impliedNodeFormat ); } From 8762de47befab52c0c614e180c02aa9ad373a3e4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 17 Sep 2022 23:52:23 +0000 Subject: [PATCH 02/15] resolve: Fix detection of declaration files --- src/instances.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instances.ts b/src/instances.ts index 0fa796394..33667b13e 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -682,7 +682,7 @@ export function getInputFileNameFromOutput( instance: TSInstance, filePath: string ): string | undefined { - if (filePath.match(tsTsxRegex) && !fileExtensionIs(filePath, '.d.ts')) { + if (filePath.match(tsTsxRegex) && !/\.d\.([cm]?ts|tsx)$/.test(filePath)) { return undefined; } if (instance.solutionBuilderHost) { From 59199998d0e9de6bc17eafa68ccaf8e656bec353 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 00:50:40 +0000 Subject: [PATCH 03/15] test: Replace inexistent package --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ccc860cfa..4cd7398b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y wget --no-install-recommends \ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && apt-get update \ - && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ + && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && apt-get purge --auto-remove -y curl \ From a821e26debc96a6001dcb8bf42935eb603f90ebd Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 00:51:23 +0000 Subject: [PATCH 04/15] test: Fix broken docker image --- .dockerignore | 1 - Dockerfile | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 45d320bac..58769291d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ .devcontainer -.git .github .vscode .test diff --git a/Dockerfile b/Dockerfile index 4cd7398b6..49b0bfc36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y wget --no-install-recommends \ && rm -rf /src/*.deb WORKDIR /TypeStrong/ts-loader +COPY .git /TypeStrong/ts-loader/.git # install packages COPY package.json yarn.lock index.js /TypeStrong/ts-loader/ From 62d8033fd3676a77763e45ce1406ed1fff23b84c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:12:49 +0000 Subject: [PATCH 05/15] devcontainer: Update outdated settings --- .devcontainer/devcontainer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2d11e83ef..e83a09475 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,13 @@ // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/zsh" + "terminal.integrated.profiles.linux": { + "zsh": { + "path": "/bin/zsh", + "icon": "terminal-bash" + } + }, + "terminal.integrated.defaultProfile.linux": "zsh", }, // Add the IDs of extensions you want installed when the container is created. From be528711c88cbdd7a64add6b7a584b101bef46ef Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:16:42 +0000 Subject: [PATCH 06/15] resolve: Allow `.cts`, `.mts`, `.cjs` and `.mjs` --- src/constants.ts | 14 +++++++------- src/instances.ts | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index eb41a5ae3..f7a9db273 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,12 +9,12 @@ export const LineFeedCode = 1; export const extensionRegex = /\.[^.]+$/; export const tsxRegex = /\.tsx$/i; -export const tsTsxRegex = /\.ts(x?)$/i; -export const dtsDtsxOrDtsDtsxMapRegex = /\.d\.ts(x?)(\.map)?$/i; -export const dtsTsTsxRegex = /(\.d)?\.ts(x?)$/i; -export const dtsTsTsxJsJsxRegex = /((\.d)?\.ts(x?)|js(x?))$/i; -export const tsTsxJsJsxRegex = /\.tsx?$|\.jsx?$/i; -export const jsJsx = /\.js(x?)$/i; -export const jsJsxMap = /\.js(x?)\.map$/i; +export const tsTsxRegex = /\.([cm]?ts|tsx)$/i; +export const dtsDtsxOrDtsDtsxMapRegex = /\.d\.([cm]?ts|tsx)(\.map)?$/i; +export const dtsTsTsxRegex = /(\.d)?\.([cm]?ts|tsx)$/i; +export const dtsTsTsxJsJsxRegex = /((\.d)?\.([cm]?[tj]s|[tj]sx))$/i; +export const tsTsxJsJsxRegex = /\.([cm]?[tj]s|[tj]sx)$/i; +export const jsJsx = /\.([cm]?js|jsx)$/i; +export const jsJsxMap = /\.([cm]?js|jsx)\.map$/i; export const jsonRegex = /\.json$/i; export const nodeModules = /node_modules/i; diff --git a/src/instances.ts b/src/instances.ts index 33667b13e..711a029d8 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -448,13 +448,13 @@ function getScriptRegexp(instance: TSInstance) { if (instance.configParseResult.options.resolveJsonModule) { // if allowJs is set then we should accept js(x) files return instance.configParseResult.options.allowJs === true - ? /\.tsx?$|\.json$|\.jsx?$/i - : /\.tsx?$|\.json$/i; + ? /\.([cm]?[tj]s|[tj]sx|json)$/i + : /\.([cm]?ts|tsx|json)$/i; } // if allowJs is set then we should accept js(x) files return instance.configParseResult.options.allowJs === true - ? /\.tsx?$|\.jsx?$/i - : /\.tsx?$/i; + ? /\.([cm]?[tj]s|[tj]sx)$/i + : /\.([cm]?ts|tsx)$/i; } export function reportTranspileErrors( From 402340cfe7f09da58202214c7e477633f3194d7d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:16:56 +0000 Subject: [PATCH 07/15] resolve: Fix broken `enhanced-resolve` calls --- src/resolver.ts | 9 ++++----- src/servicesHost.ts | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 1484d0bda..9509f00f6 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -8,8 +8,7 @@ export function makeResolver( return create.sync(options.resolve); } -export type ResolveSync = ( - context: string | undefined, - path: string, - moduleName: string -) => string | false; +export type ResolveSync = { + (context: any, path: string, moduleName: string): string | false; + (path: string, moduleName: string): string | false; +}; diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 3e6c9f8b0..01140c1c4 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -1259,7 +1259,6 @@ function resolveModule( try { const originalFileName = resolveSync( - undefined, path.normalize(path.dirname(containingFile)), moduleName ); From f6ea7b7ad05a7183ebdaece024a5894802f2adf4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:21:38 +0000 Subject: [PATCH 08/15] resolve: Improve type safety --- src/servicesHost.ts | 47 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 01140c1c4..4cd1c2e5d 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -260,31 +260,32 @@ function makeResolvers( instance ); - const resolveModuleNames = ( - moduleNames: string[], - containingFile: string, - _reusedNames?: string[] | undefined, - redirectedReference?: typescript.ResolvedProjectReference | undefined, - _?: typescript.CompilerOptions, - containingSourceFile?: typescript.SourceFile - ): (typescript.ResolvedModule | undefined)[] => { - const resolvedModules = moduleNames.map(moduleName => - resolveModule( - resolveSync, - resolveModuleName, - appendTsTsxSuffixesIfRequired, - scriptRegex, - moduleName, - containingFile, - redirectedReference, - containingSourceFile - ) - ); + const resolveModuleNames: typescript.ProgramHost['resolveModuleNames'] = + ( + moduleNames, + containingFile, + _reusedNames?, + redirectedReference?, + _?, + containingSourceFile? + ): (typescript.ResolvedModule | undefined)[] => { + const resolvedModules = moduleNames.map(moduleName => + resolveModule( + resolveSync, + resolveModuleName, + appendTsTsxSuffixesIfRequired, + scriptRegex, + moduleName, + containingFile, + redirectedReference, + containingSourceFile + ) + ); - populateDependencyGraph(resolvedModules, instance, containingFile); + populateDependencyGraph(resolvedModules, instance, containingFile); - return resolvedModules; - }; + return resolvedModules; + }; const resolveTypeReferenceDirective = makeResolveTypeReferenceDirective( compiler, From c218be48e2db044b2b8917dfb373ff0c9712d545 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:27:19 +0000 Subject: [PATCH 09/15] interop: Create a separate regex for declarations --- src/constants.ts | 1 + src/instances.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index f7a9db273..06f5fda4b 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -10,6 +10,7 @@ export const LineFeedCode = 1; export const extensionRegex = /\.[^.]+$/; export const tsxRegex = /\.tsx$/i; export const tsTsxRegex = /\.([cm]?ts|tsx)$/i; +export const declarationRegex = /\.d\.([cm]?ts|tsx)$/i; export const dtsDtsxOrDtsDtsxMapRegex = /\.d\.([cm]?ts|tsx)(\.map)?$/i; export const dtsTsTsxRegex = /(\.d)?\.([cm]?ts|tsx)$/i; export const dtsTsTsxJsJsxRegex = /((\.d)?\.([cm]?[tj]s|[tj]sx))$/i; diff --git a/src/instances.ts b/src/instances.ts index 711a029d8..afc52376d 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -7,7 +7,12 @@ import * as webpack from 'webpack'; import { makeAfterCompile } from './after-compile'; import { getCompiler, getCompilerOptions } from './compilerSetup'; import { getConfigFile, getConfigParseResult } from './config'; -import { dtsDtsxOrDtsDtsxMapRegex, EOL, tsTsxRegex } from './constants'; +import { + declarationRegex, + dtsDtsxOrDtsDtsxMapRegex, + EOL, + tsTsxRegex, +} from './constants'; import { getTSInstanceFromCache, setTSInstanceInCache } from './instance-cache'; import { FilePathKey, LoaderOptions, TSFiles, TSInstance } from './interfaces'; import * as logger from './logger'; @@ -682,7 +687,7 @@ export function getInputFileNameFromOutput( instance: TSInstance, filePath: string ): string | undefined { - if (filePath.match(tsTsxRegex) && !/\.d\.([cm]?ts|tsx)$/.test(filePath)) { + if (filePath.match(tsTsxRegex) && !declarationRegex.test(filePath)) { return undefined; } if (instance.solutionBuilderHost) { From 076e58591a3bd53d6427042ab9101340b700b223 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 11:32:09 +0000 Subject: [PATCH 10/15] types: Remove unnecessary return type --- src/servicesHost.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 4cd1c2e5d..0f6f4323c 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -268,7 +268,7 @@ function makeResolvers( redirectedReference?, _?, containingSourceFile? - ): (typescript.ResolvedModule | undefined)[] => { + ) => { const resolvedModules = moduleNames.map(moduleName => resolveModule( resolveSync, From 8dc552ec1af481520e9259ba16934143daca0293 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Sep 2022 17:13:01 +0000 Subject: [PATCH 11/15] test: Add remark on how to regenerate tests --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 49b0bfc36..5b834350c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,3 +33,8 @@ COPY test /TypeStrong/ts-loader/test # build and run tests with: # docker build -t ts-loader . # docker run -it ts-loader yarn test + +# regenerate comparison-tests with: +# docker build -t ts-loader . +# yarn build +# docker run -v $(pwd):/TypeStrong/ts-loader -it ts-loader yarn run comparison-tests --save-output From 85cfc5a941968627ef58b8cc588a18236f67868f Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Sep 2022 06:57:11 +0000 Subject: [PATCH 12/15] test: Regenerate comparison-tests --- Dockerfile | 2 +- .../aliasResolution/expectedOutput-4.8/output.txt | 10 ++-------- .../expectedOutput-4.8/patch0/output.txt | 10 ++-------- .../errorFormatter/expectedOutput-4.8/output.txt | 9 ++------- .../expectedOutput-4.8/output.txt | 11 ++--------- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 4 ++-- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-4.8/patch0/bundle.js | 2 +- .../expectedOutput-4.8/patch0/output.txt | 4 ++-- .../expectedOutput-transpile-4.8/bundle.js | 4 ++-- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/patch0/bundle.js | 2 +- .../expectedOutput-transpile-4.8/patch0/output.txt | 4 ++-- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../tsconfigInvalid/expectedOutput-4.8/bundle.js | 2 +- .../tsconfigInvalid/expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- .../tsconfigInvalidFile/expectedOutput-4.8/bundle.js | 2 +- .../tsconfigInvalidFile/expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-4.8/bundle.js | 2 +- .../expectedOutput-4.8/output.txt | 2 +- .../expectedOutput-transpile-4.8/bundle.js | 2 +- .../expectedOutput-transpile-4.8/output.txt | 2 +- 49 files changed, 57 insertions(+), 81 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b834350c..d6274eb2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,5 +36,5 @@ COPY test /TypeStrong/ts-loader/test # regenerate comparison-tests with: # docker build -t ts-loader . -# yarn build +# docker run -v $(pwd):/TypeStrong/ts-loader -it ts-loader yarn build # docker run -v $(pwd):/TypeStrong/ts-loader -it ts-loader yarn run comparison-tests --save-output diff --git a/test/comparison-tests/aliasResolution/expectedOutput-4.8/output.txt b/test/comparison-tests/aliasResolution/expectedOutput-4.8/output.txt index 1258b61ed..61d336885 100644 --- a/test/comparison-tests/aliasResolution/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/aliasResolution/expectedOutput-4.8/output.txt @@ -1,17 +1,11 @@ asset bundle.js 2.6 KiB [emitted] (name: main) -./app.ts 120 bytes [built] [code generated] [2 errors] +./app.ts 120 bytes [built] [code generated] [1 error] ./common/components/myComponent.ts 46 bytes [built] [code generated] -ERROR in app.ts -./app.ts 1:29-53 -[tsl] ERROR in app.ts(1,30) - TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations. -ts-loader-default_609318b4f68865d3 - ERROR in 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. ts-loader-default_609318b4f68865d3 -webpack compiled with 2 errors \ No newline at end of file +webpack compiled with 1 error \ No newline at end of file diff --git a/test/comparison-tests/aliasResolution/expectedOutput-4.8/patch0/output.txt b/test/comparison-tests/aliasResolution/expectedOutput-4.8/patch0/output.txt index b9e20a7e7..9ce404768 100644 --- a/test/comparison-tests/aliasResolution/expectedOutput-4.8/patch0/output.txt +++ b/test/comparison-tests/aliasResolution/expectedOutput-4.8/patch0/output.txt @@ -1,17 +1,11 @@ asset bundle.js 2.6 KiB [emitted] (name: main) -cached modules 120 bytes [cached] 1 module +./app.ts 120 bytes [built] [code generated] [1 error] ./common/components/myComponent.ts 45 bytes [built] [code generated] -ERROR in app.ts -./app.ts 1:29-53 -[tsl] ERROR in app.ts(1,30) - TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations. -ts-loader-default_609318b4f68865d3 - ERROR in 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. ts-loader-default_609318b4f68865d3 -webpack compiled with 2 errors \ No newline at end of file +webpack compiled with 1 error \ No newline at end of file diff --git a/test/comparison-tests/errorFormatter/expectedOutput-4.8/output.txt b/test/comparison-tests/errorFormatter/expectedOutput-4.8/output.txt index 57bf27ad4..28ee4f9d5 100644 --- a/test/comparison-tests/errorFormatter/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/errorFormatter/expectedOutput-4.8/output.txt @@ -1,15 +1,10 @@ asset bundle.js 2.6 KiB [emitted] (name: main) -./app.ts 120 bytes [built] [code generated] [2 errors] +./app.ts 120 bytes [built] [code generated] [1 error] ./common/components/myComponent.ts 46 bytes [built] [code generated] -ERROR in app.ts -./app.ts 1:29-53 -Does not compute.... code: 2307,severity: error,content: Cannot find module 'components/myComponent' or its corresponding type declarations.,file: app.ts,line: 1,character: 30,context: .test/errorFormatter -ts-loader-default_85b0565984bbe8dd - ERROR in 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 ts-loader-default_85b0565984bbe8dd -webpack compiled with 2 errors \ No newline at end of file +webpack compiled with 1 error \ No newline at end of file diff --git a/test/comparison-tests/localTsImplementationOfTypings/expectedOutput-4.8/output.txt b/test/comparison-tests/localTsImplementationOfTypings/expectedOutput-4.8/output.txt index 547ef058e..99c0b622c 100644 --- a/test/comparison-tests/localTsImplementationOfTypings/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/localTsImplementationOfTypings/expectedOutput-4.8/output.txt @@ -1,11 +1,4 @@ asset bundle.js 2.59 KiB [emitted] (name: main) -./app.ts 101 bytes [built] [code generated] [1 error] +./app.ts 101 bytes [built] [code generated] ./fake.ts 165 bytes [built] [code generated] - -ERROR in app.ts -./app.ts 1:29-34 -[tsl] ERROR in app.ts(1,30) - TS2307: Cannot find module 'api' or its corresponding type declarations. -ts-loader-default_609318b4f68865d3 - -webpack compiled with 1 error \ No newline at end of file +webpack compiled successfully \ No newline at end of file diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/bundle.js b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/bundle.js index 799da719b..36203d5be 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar a = __webpack_require__(/*! a */ \"./nod \*********************************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /nodeModulesMeaningfulErrorWhenImportingTs/node_modules/a/index.ts. By default, ts-loader will not compile .ts files in node_modules./nYou should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option./nSee: https://github.com/Microsoft/TypeScript/issues/12358/n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /nodeModulesMeaningfulErrorWhenImportingTs/node_modules/a/index.ts. By default, ts-loader will not compile .ts files in node_modules./nYou should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option./nSee: https://github.com/Microsoft/TypeScript/issues/12358/n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); /***/ }) diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/output.txt b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/output.txt index 616e67001..8c34a7b74 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.14 KiB [emitted] (name: main) +asset bundle.js 3.1 KiB [emitted] (name: main) ./app.ts 79 bytes [built] [code generated] ./node_modules/a/index.ts 39 bytes [built] [code generated] diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/bundle.js index d4f6450ea..be7303ca6 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }), @@ -36,7 +36,7 @@ eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeS \************************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/output.txt index ff7ae2541..626f5e4c5 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/output.txt @@ -10,7 +10,7 @@ assets by path unreferencedIndirect/ 1.42 KiB asset unreferencedIndirect/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] asset unreferencedIndirect/index.js 209 bytes [compared for emit] asset unreferencedIndirect/index.d.ts 56 bytes [compared for emit] -asset bundle.js 3.73 KiB [emitted] (name: main) +asset bundle.js 3.65 KiB [emitted] (name: main) asset indirectWithError/tsconfig.tsbuildinfo 1.33 KiB [compared for emit] asset lib/tsconfig.tsbuildinfo 1.33 KiB [compared for emit] ./app.ts 187 bytes [built] [code generated] diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/bundle.js index ba0cfa804..26d312467 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/bundle.js @@ -37,7 +37,7 @@ eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n \************************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/output.txt index fa31db1d5..c9fe83381 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-4.8/patch0/output.txt @@ -5,8 +5,8 @@ assets by status 369 bytes [compared for emit] assets by path lib/*.ts 123 bytes asset lib/index.d.ts 84 bytes [compared for emit] asset lib/fileWithError.d.ts 39 bytes [compared for emit] -assets by status 4.72 KiB [emitted] - asset bundle.js 3.39 KiB [emitted] (name: main) +assets by status 4.68 KiB [emitted] + asset bundle.js 3.35 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.33 KiB [emitted] ./app.ts 187 bytes [built] [code generated] ./lib/index.ts 119 bytes [built] [code generated] diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/bundle.js index 3ec964a07..154ac8198 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }), @@ -36,7 +36,7 @@ eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeS \************************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/output.txt index fa0ac8b34..582fc7005 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/output.txt @@ -10,7 +10,7 @@ assets by path unreferencedIndirect/ 1.42 KiB asset unreferencedIndirect/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] asset unreferencedIndirect/index.js 209 bytes [compared for emit] asset unreferencedIndirect/index.d.ts 56 bytes [compared for emit] -asset bundle.js 3.79 KiB [emitted] (name: main) +asset bundle.js 3.7 KiB [emitted] (name: main) asset indirectWithError/tsconfig.tsbuildinfo 1.33 KiB [compared for emit] asset lib/tsconfig.tsbuildinfo 1.33 KiB [compared for emit] ./app.ts 223 bytes [built] [code generated] [2 errors] diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/bundle.js index 61a506c07..85d1f1a8b 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/bundle.js @@ -37,7 +37,7 @@ eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n \************************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesMultiple.transpile/utils/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/output.txt index f063833c9..17ef1e1d0 100644 --- a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-4.8/patch0/output.txt @@ -5,8 +5,8 @@ assets by status 369 bytes [compared for emit] assets by path lib/*.ts 123 bytes asset lib/index.d.ts 84 bytes [compared for emit] asset lib/fileWithError.d.ts 39 bytes [compared for emit] -assets by status 4.77 KiB [emitted] - asset bundle.js 3.44 KiB [emitted] (name: main) +assets by status 4.73 KiB [emitted] + asset bundle.js 3.4 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.33 KiB [emitted] ./app.ts 223 bytes [built] [code generated] [1 error] ./lib/index.ts 119 bytes [built] [code generated] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/bundle.js index 73200bf0c..b080b0e4b 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/output.txt index 7dd409076..dab2653f1 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.97 KiB [emitted] (name: main) +asset bundle.js 2.93 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] ./app.ts 131 bytes [built] [code generated] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/bundle.js index 5a94384be..337895873 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/output.txt index 350c4dd81..6bd0b105a 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.02 KiB [emitted] (name: main) +asset bundle.js 2.97 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js index e1aca9391..9d4eeff98 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt index b73f84d18..c572d3e67 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.99 KiB [emitted] (name: main) +asset bundle.js 2.94 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] asset tsconfig.tsbuildinfo 759 bytes [emitted] asset app.d.ts 11 bytes [emitted] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js index 5bc981a13..fd6ad7910 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt index 3581bed56..df1f1866c 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.04 KiB [emitted] (name: main) +asset bundle.js 2.99 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/bundle.js index d1ee43eaf..0e281d0be 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/output.txt index ff0457109..a4e56c481 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.98 KiB [emitted] (name: main) +asset bundle.js 2.93 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] ./app.ts 131 bytes [built] [code generated] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js index 49ad02245..8e8266e1f 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SemanticErrorInReference_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt index 68ab386ce..f6d2a8e20 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.03 KiB [emitted] (name: main) +asset bundle.js 2.98 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.24 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/bundle.js index 4f2e2cfd9..feee9be7f 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/output.txt index c7ca215ee..5508a602d 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.97 KiB [emitted] (name: main) +asset bundle.js 2.92 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] ./app.ts 131 bytes [built] [code generated] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/bundle.js index c3c29188e..b3da681f5 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/output.txt index 0ff120e6e..d2c3c51e4 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.02 KiB [emitted] (name: main) +asset bundle.js 2.97 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js index ed1b6f81d..5184ce202 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt index 8a83cd8dd..705c31b4e 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.99 KiB [emitted] (name: main) +asset bundle.js 2.94 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] asset tsconfig.tsbuildinfo 759 bytes [emitted] asset app.d.ts 11 bytes [emitted] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js index 9fd449141..1758a0646 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt index 6ab55dd11..3351d3609 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.03 KiB [emitted] (name: main) +asset bundle.js 2.99 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/bundle.js index a67bb99d1..cb18c4ca9 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/output.txt index fa27121d6..3e6562dec 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.98 KiB [emitted] (name: main) +asset bundle.js 2.93 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] ./app.ts 131 bytes [built] [code generated] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js index 44db080f0..82d6167f1 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/bundle.js @@ -26,7 +26,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**********************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/home/john/code/github/ts-loader/dist/index.js:52:18)/n at successLoader (/home/john/code/github/ts-loader/dist/index.js:39:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi.transpile/lib/index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (/TypeStrong/ts-loader/dist/index.js:52:18)/n at successLoader (/TypeStrong/ts-loader/dist/index.js:39:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt index f71246b3a..d446ac266 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 3.02 KiB [emitted] (name: main) +asset bundle.js 2.98 KiB [emitted] (name: main) asset lib/tsconfig.tsbuildinfo 1.16 KiB [compared for emit] ./app.ts 167 bytes [built] [code generated] [1 error] ./lib/index.ts 39 bytes [built] [code generated] [1 error] diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/bundle.js b/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/bundle.js index a5b7e4b6a..411e70329 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/bundle.js @@ -15,7 +15,7 @@ \****************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/output.txt b/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/output.txt index bbc2c3b18..2e1a98088 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 1.36 KiB [emitted] (name: main) +asset bundle.js 1.35 KiB [emitted] (name: main) ./app.ts 39 bytes [built] [code generated] [3 errors] ERROR in tsconfig.json diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/bundle.js index a5b7e4b6a..411e70329 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/bundle.js @@ -15,7 +15,7 @@ \****************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/output.txt index bbc2c3b18..2e1a98088 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 1.36 KiB [emitted] (name: main) +asset bundle.js 1.35 KiB [emitted] (name: main) ./app.ts 39 bytes [built] [code generated] [3 errors] ERROR in tsconfig.json diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/bundle.js b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/bundle.js index 7d287acd5..2cd5bcaf3 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/bundle.js @@ -15,7 +15,7 @@ \****************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: /tsconfigInvalidFile/i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: /tsconfigInvalidFile/i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:17:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/output.txt b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/output.txt index ea90fda7a..8145d9246 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 1.47 KiB [emitted] (name: main) +asset bundle.js 1.45 KiB [emitted] (name: main) ./app.ts 39 bytes [built] [code generated] [1 error] ERROR in ./app.ts diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/bundle.js index b48fdbc29..9889698b0 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/bundle.js @@ -15,7 +15,7 @@ \****************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective / useCaseSensitiveFileNames/n/n at validateLoaderOptions (/home/john/code/github/ts-loader/dist/index.js:145:19)/n at getLoaderOptions (/home/john/code/github/ts-loader/dist/index.js:102:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:14:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective / useCaseSensitiveFileNames/n/n at validateLoaderOptions (/TypeStrong/ts-loader/dist/index.js:145:19)/n at getLoaderOptions (/TypeStrong/ts-loader/dist/index.js:102:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:14:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/output.txt index d923e01d7..a0256a332 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.07 KiB [emitted] (name: main) +asset bundle.js 2.04 KiB [emitted] (name: main) ./app.ts 39 bytes [built] [code generated] [1 error] ERROR in ./app.ts diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/bundle.js index b48fdbc29..9889698b0 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/bundle.js @@ -15,7 +15,7 @@ \****************/ /***/ (() => { -eval("throw new Error(\"Module build failed (from ../../index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective / useCaseSensitiveFileNames/n/n at validateLoaderOptions (/home/john/code/github/ts-loader/dist/index.js:145:19)/n at getLoaderOptions (/home/john/code/github/ts-loader/dist/index.js:102:5)/n at Object.loader (/home/john/code/github/ts-loader/dist/index.js:14:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from ../../index.js):/nError: ts-loader was supplied with an unexpected loader option: notRealOption/n/nPlease take a look at the options you are supplying; the following are valid options:/nsilent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective / useCaseSensitiveFileNames/n/n at validateLoaderOptions (/TypeStrong/ts-loader/dist/index.js:145:19)/n at getLoaderOptions (/TypeStrong/ts-loader/dist/index.js:102:5)/n at Object.loader (/TypeStrong/ts-loader/dist/index.js:14:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/output.txt index d923e01d7..a0256a332 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-transpile-4.8/output.txt @@ -1,4 +1,4 @@ -asset bundle.js 2.07 KiB [emitted] (name: main) +asset bundle.js 2.04 KiB [emitted] (name: main) ./app.ts 39 bytes [built] [code generated] [1 error] ERROR in ./app.ts From c415a496d1d14070f94d0f3d9be4f3fd2f0a1746 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Sep 2022 07:26:43 +0000 Subject: [PATCH 13/15] Bump the version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 653041fdf..60b942f5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "9.3.1", + "version": "9.4.0", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", From acb60eff6334ba3dc8dc2a92b4b0f62ae3b4e083 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Sep 2022 07:31:46 +0000 Subject: [PATCH 14/15] Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4245f8b0..b0ea7aa1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v9.4.0 + +* [Add Support for Resolving `.cjs`, `.mjs`, `.cts` and `.mts` Files](https://github.com/TypeStrong/ts-loader/pull/1503) [#1503] + ## v9.3.1 * [Bug fix: Generate declaration files for js files if allowJs is set to true](https://github.com/TypeStrong/ts-loader/pull/1483) [#1260] - thanks @hediet and @mvilliger From c35bf1dc1dd536b9f1cde459028b3736aee13b46 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Sep 2022 09:54:12 +0200 Subject: [PATCH 15/15] doc: Update CHANGELOG.md Co-authored-by: John Reilly --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ea7aa1f..7dd777cf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v9.4.0 -* [Add Support for Resolving `.cjs`, `.mjs`, `.cts` and `.mts` Files](https://github.com/TypeStrong/ts-loader/pull/1503) [#1503] +* [Add Support for Resolving `.cjs`, `.mjs`, `.cts` and `.mts` Files](https://github.com/TypeStrong/ts-loader/pull/1503) [#1503] - thanks @manuth ## v9.3.1