From aa8e7eef87a35510943e7a4c0031d7aed21fdf51 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 19 Sep 2019 06:23:33 +0100 Subject: [PATCH 1/9] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9b5b1631..171a14247 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,10 @@ install: - yarn lint - yarn add $TYPESCRIPT env: + - TYPESCRIPT=typescript@3.6.2 + - TYPESCRIPT=typescript@next - TYPESCRIPT=typescript@3.5.1 - TYPESCRIPT=typescript@3.4.4 - - TYPESCRIPT=typescript@next - TYPESCRIPT=typescript@3.3.3 - TYPESCRIPT=typescript@3.2.1 - TYPESCRIPT=typescript@3.1.1 @@ -27,4 +28,4 @@ env: - TYPESCRIPT=typescript@2.6.1 - TYPESCRIPT=typescript@2.5.2 - TYPESCRIPT=typescript@2.4.1 - \ No newline at end of file + From 479d5019faf0eb04c921550f5ef27a4cb0ea1d95 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 19 Sep 2019 06:24:23 +0100 Subject: [PATCH 2/9] Update appveyor.yml --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 67faad0d8..40b301f02 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,9 +3,10 @@ environment: FORCE_COLOR: 1 nodejs_version: "10" matrix: + - TYPESCRIPT: typescript@3.6.2 + - TYPESCRIPT: typescript@next - TYPESCRIPT: typescript@3.5.1 - TYPESCRIPT: typescript@3.4.4 - - TYPESCRIPT: typescript@next - TYPESCRIPT: typescript@3.3.3 - TYPESCRIPT: typescript@3.2.1 - TYPESCRIPT: typescript@3.1.1 From 3123a19af62ec6e40a8fb98fbf8ccfa7a0381015 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 19 Sep 2019 06:59:34 +0100 Subject: [PATCH 3/9] update comparison tests --- .../instance/expectedOutput-3.6/bundle.js | 2 +- .../instance/expectedOutput-3.6/bundle.transpiled.js | 2 +- .../expectedOutput-3.6/output.transpiled.txt | 10 +++++----- .../instance/expectedOutput-3.6/output.txt | 6 +++--- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 6 +++--- .../npmLink/expectedOutput-3.6/bundle.js | 8 ++++---- .../npmLink/expectedOutput-3.6/bundle.transpiled.js | 8 ++++---- .../npmLink/expectedOutput-3.6/output.transpiled.txt | 4 ++-- .../npmLink/expectedOutput-3.6/output.txt | 2 +- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 6 +++--- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 4 ++-- .../expectedOutput-3.6/bundle.js | 4 ++-- .../expectedOutput-3.6/output.txt | 12 ++++++------ .../expectedOutput-3.6/patch0/bundle.js | 2 +- .../expectedOutput-3.6/patch0/output.txt | 4 ++-- .../tsconfigInvalid/expectedOutput-3.6/bundle.js | 2 +- .../tsconfigInvalid/expectedOutput-3.6/output.txt | 2 +- .../tsconfigInvalidFile/expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 2 +- .../tsconfigNotReadable/expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/bundle.transpiled.js | 2 +- .../expectedOutput-3.6/output.transpiled.txt | 4 ++-- .../expectedOutput-3.6/output.txt | 4 ++-- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 6 +++--- 28 files changed, 57 insertions(+), 57 deletions(-) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/bundle.js b/test/comparison-tests/instance/expectedOutput-3.6/bundle.js index 847b14122..373d66507 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/instance/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//instance//i-dont-exist/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//instance//i-dont-exist/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); /***/ }) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js index b05300acd..ece03284a 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//instance.transpile//i-dont-exist/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//instance.transpile//i-dont-exist/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); /***/ }) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt index 75d24f5f4..11f2b7f4d 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt @@ -1,16 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.03 KiB a [emitted] a +bundle.js 4.02 KiB a [emitted] a Entrypoint a = bundle.js Entrypoint b = -[./a.ts] 289 bytes {a} [built] [failed] [1 error] -[./b.ts] 289 bytes {b} [built] [failed] [1 error] +[./a.ts] 283 bytes {a} [built] [failed] [1 error] +[./b.ts] 283 bytes {b} [built] [failed] [1 error] -ERROR in ./a.ts +ERROR in ./b.ts Module build failed (from /index.js): Error: A file specified in tsconfig.json could not be found: i-dont-exist at Object.loader (dist\index.js:19:18) -ERROR in ./b.ts +ERROR in ./a.ts Module build failed (from /index.js): Error: A file specified in tsconfig.json could not be found: i-dont-exist at Object.loader (dist\index.js:19:18) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/output.txt b/test/comparison-tests/instance/expectedOutput-3.6/output.txt index 583513f04..f151ce582 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/instance/expectedOutput-3.6/output.txt @@ -1,9 +1,9 @@ Asset Size Chunks Chunk Names -bundle.js 4.02 KiB a [emitted] a +bundle.js 4.01 KiB a [emitted] a Entrypoint a = bundle.js Entrypoint b = -[./a.ts] 279 bytes {a} [built] [failed] [1 error] -[./b.ts] 279 bytes {b} [built] [failed] [1 error] +[./a.ts] 273 bytes {a} [built] [failed] [1 error] +[./b.ts] 273 bytes {b} [built] [failed] [1 error] ERROR in ./a.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js index 5f22097da..31bb98592 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar a = __webpack_require__(/*! a */ \"./nod /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: TypeScript emitted no output for C://source//ts-loader//.test//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 (C://source//ts-loader//dist//index.js:78:15)/n at successLoader (C://source//ts-loader//dist//index.js:68:9)/n at Object.loader (C://source//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//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 (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); /***/ }) diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt index 393e11295..9f18a5a56 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt @@ -1,15 +1,15 @@ Asset Size Chunks Chunk Names -bundle.js 4.87 KiB main [emitted] main +bundle.js 4.86 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 79 bytes {main} [built] -[./node_modules/a/index.ts] 669 bytes {main} [built] [failed] [1 error] +[./node_modules/a/index.ts] 659 bytes {main} [built] [failed] [1 error] ERROR in ./node_modules/a/index.ts Module build failed (from /index.js): Error: TypeScript emitted no output for node_modules\a\index.ts. By default, ts-loader will not compile .ts files in node_modules. You should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option. See: https://github.com/Microsoft/TypeScript/issues/12358 - at makeSourceMapAndFinish (dist\index.js:78:15) + at makeSourceMapAndFinish (dist\index.js:80:15) at successLoader (dist\index.js:68:9) at Object.loader (dist\index.js:22:12) @ ./app.ts 3:8-20 \ No newline at end of file diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js index 943633ef8..d4e22cf78 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js @@ -87,14 +87,14 @@ /******/ ({ /***/ "../../test/comparison-tests/testLib/foo.ts": -/*!****************************************************************!*\ - !*** C:/source/ts-loader/test/comparison-tests/testLib/foo.ts ***! - \****************************************************************/ +/*!**************************************************************!*\ + !*** C:/work/ts-loader/test/comparison-tests/testLib/foo.ts ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nexports[\"default\"] = 'foo';\n\n\n//# sourceURL=webpack:///C:/source/ts-loader/test/comparison-tests/testLib/foo.ts?"); +eval("\nexports.__esModule = true;\nexports[\"default\"] = 'foo';\n\n\n//# sourceURL=webpack:///C:/work/ts-loader/test/comparison-tests/testLib/foo.ts?"); /***/ }), diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js index ed397bb26..325c6e779 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js @@ -87,14 +87,14 @@ /******/ ({ /***/ "../../test/comparison-tests/testLib/foo.ts": -/*!****************************************************************!*\ - !*** C:/source/ts-loader/test/comparison-tests/testLib/foo.ts ***! - \****************************************************************/ +/*!**************************************************************!*\ + !*** C:/work/ts-loader/test/comparison-tests/testLib/foo.ts ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'foo';\n\n\n//# sourceURL=webpack:///C:/source/ts-loader/test/comparison-tests/testLib/foo.ts?"); +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'foo';\n\n\n//# sourceURL=webpack:///C:/work/ts-loader/test/comparison-tests/testLib/foo.ts?"); /***/ }), diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt index 4bff2e9e8..5971df720 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt @@ -1,5 +1,5 @@ - Asset Size Chunks Chunk Names -bundle.js 4.51 KiB main [emitted] main + Asset Size Chunks Chunk Names +bundle.js 4.5 KiB main [emitted] main Entrypoint main = bundle.js [../../test/comparison-tests/testLib/foo.ts] /test/comparison-tests/testLib/foo.ts 102 bytes {main} [built] [./app.ts] 137 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt b/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt index 454161ad6..be6f473d8 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt @@ -1,5 +1,5 @@ Asset Size Chunks Chunk Names -bundle.js 4.45 KiB main [emitted] main +bundle.js 4.44 KiB main [emitted] main Entrypoint main = bundle.js [../../test/comparison-tests/testLib/foo.ts] /test/comparison-tests/testLib/foo.ts 69 bytes {main} [built] [./app.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js index 2a0dc3143..7904f11b8 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from c:/github/ts-loader/index.js):/nError: TypeScript emitted no output for c://github//ts-loader//.test//projectReferencesNotBuilt_SemanticErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (c://github//ts-loader//dist//index.js:80:15)/n at successLoader (c://github//ts-loader//dist//index.js:68:9)/n at Object.loader (c://github//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//projectReferencesNotBuilt_SemanticErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt index a98b3d39a..31c13fe17 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt @@ -1,8 +1,8 @@ - Asset Size Chunks Chunk Names -bundle.js 4.7 KiB main [emitted] main + Asset Size Chunks Chunk Names +bundle.js 4.69 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 509 bytes {main} [built] [failed] [2 errors] +[./lib/index.ts] 499 bytes {main} [built] [failed] [2 errors] ERROR in ./lib/index.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js index 9de08bd27..fb79533d1 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from c:/github/ts-loader/index.js):/nError: TypeScript emitted no output for c://github//ts-loader//.test//projectReferencesNotBuilt_SyntaxErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (c://github//ts-loader//dist//index.js:80:15)/n at successLoader (c://github//ts-loader//dist//index.js:68:9)/n at Object.loader (c://github//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//projectReferencesNotBuilt_SyntaxErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt index 8304bdb95..17bcbc10d 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt @@ -1,8 +1,8 @@ Asset Size Chunks Chunk Names -bundle.js 4.69 KiB main [emitted] main +bundle.js 4.68 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 507 bytes {main} [built] [failed] [2 errors] +[./lib/index.ts] 497 bytes {main} [built] [failed] [2 errors] ERROR in ./lib/index.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/bundle.js index d01765a8e..ffee685a9 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/bundle.js @@ -106,7 +106,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\nexports.__esModule = true;\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\r\nexports.__esModule = true;\r\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./lib/helper.ts\");\r\nexports.lib = {\r\n one: helper_1.helper.one,\r\n two: helper_1.helper.two,\r\n three: helper_1.helper.three\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\nexports.__esModule = true;\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./lib/helper.ts\");\nexports.lib = {\n one: helper_1.helper.one,\n two: helper_1.helper.two,\n three: helper_1.helper.three\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/output.txt index 82af8d6b7..f7abbd16e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/output.txt @@ -1,9 +1,9 @@ Asset Size Chunks Chunk Names - bundle.js 4.8 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] - ../lib/helper.d.ts 92 bytes [emitted] -../lib/tsconfig.tsbuildinfo 71.4 KiB [emitted] + bundle.js 4.77 KiB main [emitted] main + ../lib/index.d.ts 84 bytes [emitted] + ../lib/helper.d.ts 87 bytes [emitted] +../lib/tsconfig.tsbuildinfo 72.7 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/helper.ts] 107 bytes {main} [built] -[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file +[./lib/helper.ts] 100 bytes {main} [built] +[./lib/index.ts] 189 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/bundle.js index 161ae86cc..7671ef9e3 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\nexports.__esModule = true;\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/output.txt index 68e7278b2..38e6b2318 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.6/patch0/output.txt @@ -1,8 +1,8 @@ Asset Size Chunks Chunk Names - bundle.js 4.82 KiB main [emitted] main + bundle.js 4.8 KiB main [emitted] main ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 68.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/helper.ts] 107 bytes {main} +[./lib/helper.ts] 100 bytes {main} [./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js index 304f7229b..efa126f56 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt index 47bb06817..183fbfc49 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 3.95 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 206 bytes {main} [built] [failed] [3 errors] +[./app.ts] 202 bytes {main} [built] [failed] [3 errors] ERROR in tsconfig.json [tsl] ERROR diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js index b3cc9379a..0b4b631fd 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//tsconfigInvalidFile//i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//tsconfigInvalidFile//i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt index 993192773..b5b6bc402 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.06 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 312 bytes {main} [built] [failed] [1 error] +[./app.ts] 306 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js index 68384d66f..93d5d69e2 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://source//ts-loader//.test//tsconfigNotReadable//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://work//ts-loader//.test//tsconfigNotReadable//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js index d94a76001..956a538bc 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://source//ts-loader//.test//tsconfigNotReadable.transpile//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://work//ts-loader//.test//tsconfigNotReadable.transpile//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt index b172f4309..23c26d32b 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names -bundle.js 4.33 KiB main [emitted] main +bundle.js 4.32 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 559 bytes {main} [built] [failed] [1 error] +[./app.ts] 553 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt index f4610e7b3..dbf4356f0 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names -bundle.js 4.32 KiB main [emitted] main +bundle.js 4.31 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 549 bytes {main} [built] [failed] [1 error] +[./app.ts] 543 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js index a2e209d25..8bde8bb03 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/source/ts-loader/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/n/n at validateLoaderOptions (C://source//ts-loader//dist//index.js:153:19)/n at getLoaderOptions (C://source//ts-loader//dist//index.js:110:5)/n at Object.loader (C://source//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/work/ts-loader/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/n/n at validateLoaderOptions (C://work//ts-loader//dist//index.js:155:19)/n at getLoaderOptions (C://work//ts-loader//dist//index.js:112:5)/n at Object.loader (C://work//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt index da41ad53f..28984fe7f 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.63 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 887 bytes {main} [built] [failed] [1 error] +[./app.ts] 879 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): @@ -10,6 +10,6 @@ Error: ts-loader was supplied with an unexpected loader option: notRealOption Please take a look at the options you are supplying; the following are valid options: silent / logLevel / logInfoToStdOut / instance / compiler / context / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / onlyCompileBundledFiles / happyPackMode / getCustomTransformers / reportFiles / experimentalWatchApi / allowTsInNodeModules / experimentalFileCaching / projectReferences / resolveModuleName / resolveTypeReferenceDirective - at validateLoaderOptions (dist\index.js:153:19) - at getLoaderOptions (dist\index.js:110:5) + at validateLoaderOptions (dist\index.js:155:19) + at getLoaderOptions (dist\index.js:112:5) at Object.loader (dist\index.js:16:21) \ No newline at end of file From 3e384d946a7b96cb07936b5d4e05a6e7520a4e36 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 19 Sep 2019 07:22:02 +0100 Subject: [PATCH 4/9] update to TS 3.6.3 --- .travis.yml | 2 +- appveyor.yml | 2 +- .../instance/expectedOutput-3.6/bundle.js | 2 +- .../instance/expectedOutput-3.6/bundle.transpiled.js | 2 +- .../instance/expectedOutput-3.6/output.transpiled.txt | 10 +++++----- .../instance/expectedOutput-3.6/output.txt | 6 +++--- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 4 ++-- .../npmLink/expectedOutput-3.6/bundle.js | 8 ++++---- .../npmLink/expectedOutput-3.6/bundle.transpiled.js | 8 ++++---- .../npmLink/expectedOutput-3.6/output.transpiled.txt | 4 ++-- .../npmLink/expectedOutput-3.6/output.txt | 2 +- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 6 +++--- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 4 ++-- .../tsconfigInvalid/expectedOutput-3.6/bundle.js | 2 +- .../tsconfigInvalid/expectedOutput-3.6/output.txt | 2 +- .../tsconfigInvalidFile/expectedOutput-3.6/bundle.js | 2 +- .../tsconfigInvalidFile/expectedOutput-3.6/output.txt | 2 +- .../tsconfigNotReadable/expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/bundle.transpiled.js | 2 +- .../expectedOutput-3.6/output.transpiled.txt | 4 ++-- .../tsconfigNotReadable/expectedOutput-3.6/output.txt | 4 ++-- .../expectedOutput-3.6/bundle.js | 2 +- .../expectedOutput-3.6/output.txt | 2 +- yarn.lock | 6 +++--- 27 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.travis.yml b/.travis.yml index 171a14247..029dc8538 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - yarn lint - yarn add $TYPESCRIPT env: - - TYPESCRIPT=typescript@3.6.2 + - TYPESCRIPT=typescript@3.6.3 - TYPESCRIPT=typescript@next - TYPESCRIPT=typescript@3.5.1 - TYPESCRIPT=typescript@3.4.4 diff --git a/appveyor.yml b/appveyor.yml index 40b301f02..e7df55c17 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ environment: FORCE_COLOR: 1 nodejs_version: "10" matrix: - - TYPESCRIPT: typescript@3.6.2 + - TYPESCRIPT: typescript@3.6.3 - TYPESCRIPT: typescript@next - TYPESCRIPT: typescript@3.5.1 - TYPESCRIPT: typescript@3.4.4 diff --git a/test/comparison-tests/instance/expectedOutput-3.6/bundle.js b/test/comparison-tests/instance/expectedOutput-3.6/bundle.js index 373d66507..847b14122 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/instance/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//instance//i-dont-exist/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//instance//i-dont-exist/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); /***/ }) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js index ece03284a..b05300acd 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/instance/expectedOutput-3.6/bundle.transpiled.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//instance.transpile//i-dont-exist/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//instance.transpile//i-dont-exist/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./a.ts?"); /***/ }) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt index 11f2b7f4d..75d24f5f4 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/instance/expectedOutput-3.6/output.transpiled.txt @@ -1,16 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.02 KiB a [emitted] a +bundle.js 4.03 KiB a [emitted] a Entrypoint a = bundle.js Entrypoint b = -[./a.ts] 283 bytes {a} [built] [failed] [1 error] -[./b.ts] 283 bytes {b} [built] [failed] [1 error] +[./a.ts] 289 bytes {a} [built] [failed] [1 error] +[./b.ts] 289 bytes {b} [built] [failed] [1 error] -ERROR in ./b.ts +ERROR in ./a.ts Module build failed (from /index.js): Error: A file specified in tsconfig.json could not be found: i-dont-exist at Object.loader (dist\index.js:19:18) -ERROR in ./a.ts +ERROR in ./b.ts Module build failed (from /index.js): Error: A file specified in tsconfig.json could not be found: i-dont-exist at Object.loader (dist\index.js:19:18) diff --git a/test/comparison-tests/instance/expectedOutput-3.6/output.txt b/test/comparison-tests/instance/expectedOutput-3.6/output.txt index f151ce582..583513f04 100644 --- a/test/comparison-tests/instance/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/instance/expectedOutput-3.6/output.txt @@ -1,9 +1,9 @@ Asset Size Chunks Chunk Names -bundle.js 4.01 KiB a [emitted] a +bundle.js 4.02 KiB a [emitted] a Entrypoint a = bundle.js Entrypoint b = -[./a.ts] 273 bytes {a} [built] [failed] [1 error] -[./b.ts] 273 bytes {b} [built] [failed] [1 error] +[./a.ts] 279 bytes {a} [built] [failed] [1 error] +[./b.ts] 279 bytes {b} [built] [failed] [1 error] ERROR in ./a.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js index 31bb98592..d008dc8a6 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar a = __webpack_require__(/*! a */ \"./nod /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//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 (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: TypeScript emitted no output for C://source//ts-loader//.test//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 (C://source//ts-loader//dist//index.js:80:15)/n at successLoader (C://source//ts-loader//dist//index.js:68:9)/n at Object.loader (C://source//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?"); /***/ }) diff --git a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt index 9f18a5a56..a6581634d 100644 --- a/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-3.6/output.txt @@ -1,8 +1,8 @@ Asset Size Chunks Chunk Names -bundle.js 4.86 KiB main [emitted] main +bundle.js 4.87 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 79 bytes {main} [built] -[./node_modules/a/index.ts] 659 bytes {main} [built] [failed] [1 error] +[./node_modules/a/index.ts] 669 bytes {main} [built] [failed] [1 error] ERROR in ./node_modules/a/index.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js index d4e22cf78..943633ef8 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.js @@ -87,14 +87,14 @@ /******/ ({ /***/ "../../test/comparison-tests/testLib/foo.ts": -/*!**************************************************************!*\ - !*** C:/work/ts-loader/test/comparison-tests/testLib/foo.ts ***! - \**************************************************************/ +/*!****************************************************************!*\ + !*** C:/source/ts-loader/test/comparison-tests/testLib/foo.ts ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nexports[\"default\"] = 'foo';\n\n\n//# sourceURL=webpack:///C:/work/ts-loader/test/comparison-tests/testLib/foo.ts?"); +eval("\nexports.__esModule = true;\nexports[\"default\"] = 'foo';\n\n\n//# sourceURL=webpack:///C:/source/ts-loader/test/comparison-tests/testLib/foo.ts?"); /***/ }), diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js index 325c6e779..ed397bb26 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/bundle.transpiled.js @@ -87,14 +87,14 @@ /******/ ({ /***/ "../../test/comparison-tests/testLib/foo.ts": -/*!**************************************************************!*\ - !*** C:/work/ts-loader/test/comparison-tests/testLib/foo.ts ***! - \**************************************************************/ +/*!****************************************************************!*\ + !*** C:/source/ts-loader/test/comparison-tests/testLib/foo.ts ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'foo';\n\n\n//# sourceURL=webpack:///C:/work/ts-loader/test/comparison-tests/testLib/foo.ts?"); +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'foo';\n\n\n//# sourceURL=webpack:///C:/source/ts-loader/test/comparison-tests/testLib/foo.ts?"); /***/ }), diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt index 5971df720..4bff2e9e8 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/output.transpiled.txt @@ -1,5 +1,5 @@ - Asset Size Chunks Chunk Names -bundle.js 4.5 KiB main [emitted] main + Asset Size Chunks Chunk Names +bundle.js 4.51 KiB main [emitted] main Entrypoint main = bundle.js [../../test/comparison-tests/testLib/foo.ts] /test/comparison-tests/testLib/foo.ts 102 bytes {main} [built] [./app.ts] 137 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt b/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt index be6f473d8..454161ad6 100644 --- a/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/npmLink/expectedOutput-3.6/output.txt @@ -1,5 +1,5 @@ Asset Size Chunks Chunk Names -bundle.js 4.44 KiB main [emitted] main +bundle.js 4.45 KiB main [emitted] main Entrypoint main = bundle.js [../../test/comparison-tests/testLib/foo.ts] /test/comparison-tests/testLib/foo.ts 69 bytes {main} [built] [./app.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js index 7904f11b8..2de543f28 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//projectReferencesNotBuilt_SemanticErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: TypeScript emitted no output for C://source//ts-loader//.test//projectReferencesNotBuilt_SemanticErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://source//ts-loader//dist//index.js:80:15)/n at successLoader (C://source//ts-loader//dist//index.js:68:9)/n at Object.loader (C://source//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt index 31c13fe17..a98b3d39a 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.6/output.txt @@ -1,8 +1,8 @@ - Asset Size Chunks Chunk Names -bundle.js 4.69 KiB main [emitted] main + Asset Size Chunks Chunk Names +bundle.js 4.7 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 499 bytes {main} [built] [failed] [2 errors] +[./lib/index.ts] 509 bytes {main} [built] [failed] [2 errors] ERROR in ./lib/index.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js index fb79533d1..ae5f02974 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/bundle.js @@ -105,7 +105,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: TypeScript emitted no output for C://work//ts-loader//.test//projectReferencesNotBuilt_SyntaxErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://work//ts-loader//dist//index.js:80:15)/n at successLoader (C://work//ts-loader//dist//index.js:68:9)/n at Object.loader (C://work//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: TypeScript emitted no output for C://source//ts-loader//.test//projectReferencesNotBuilt_SyntaxErrorInReference//lib//index.ts. The most common cause for this is having errors when building referenced projects./n at makeSourceMapAndFinish (C://source//ts-loader//dist//index.js:80:15)/n at successLoader (C://source//ts-loader//dist//index.js:68:9)/n at Object.loader (C://source//ts-loader//dist//index.js:22:12)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt index 17bcbc10d..8304bdb95 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.6/output.txt @@ -1,8 +1,8 @@ Asset Size Chunks Chunk Names -bundle.js 4.68 KiB main [emitted] main +bundle.js 4.69 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 497 bytes {main} [built] [failed] [2 errors] +[./lib/index.ts] 507 bytes {main} [built] [failed] [2 errors] ERROR in ./lib/index.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js index efa126f56..304f7229b 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while parsing tsconfig.json/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt index 183fbfc49..47bb06817 100644 --- a/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigInvalid/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 3.95 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 202 bytes {main} [built] [failed] [3 errors] +[./app.ts] 206 bytes {main} [built] [failed] [3 errors] ERROR in tsconfig.json [tsl] ERROR diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js index 0b4b631fd..b3cc9379a 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://work//ts-loader//.test//tsconfigInvalidFile//i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31mA file specified in tsconfig.json could not be found: C://source//ts-loader//.test//tsconfigInvalidFile//i-am-a-file-what-does-not-exist.ts/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt index b5b6bc402..993192773 100644 --- a/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigInvalidFile/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.06 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 306 bytes {main} [built] [failed] [1 error] +[./app.ts] 312 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js index 93d5d69e2..68384d66f 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://work//ts-loader//.test//tsconfigNotReadable//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://source//ts-loader//.test//tsconfigNotReadable//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js index 956a538bc..d94a76001 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/bundle.transpiled.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://work//ts-loader//.test//tsconfigNotReadable.transpile//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://work//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/index.js):/nError: /u001b[31merror while reading tsconfig.json:/u001b[39m/r/n/u001b[31m/u001b[90m[tsl] /u001b[31m/u001b[1m/u001b[31mERROR/u001b[31m/u001b[22m/u001b[1m/u001b[31m in /u001b[31m/u001b[22m/u001b[1m/u001b[36mC://source//ts-loader//.test//tsconfigNotReadable.transpile//tsconfig.json(5,2)/u001b[31m/u001b[22m/u001b[39m/r/n/u001b[31m/u001b[1m/u001b[31m TS1109: Expression expected./u001b[31m/u001b[22m/u001b[39m/n at Object.loader (C://source//ts-loader//dist//index.js:19:18)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt index 23c26d32b..b172f4309 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.transpiled.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names -bundle.js 4.32 KiB main [emitted] main +bundle.js 4.33 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 553 bytes {main} [built] [failed] [1 error] +[./app.ts] 559 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt index dbf4356f0..f4610e7b3 100644 --- a/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/tsconfigNotReadable/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names -bundle.js 4.31 KiB main [emitted] main +bundle.js 4.32 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 543 bytes {main} [built] [failed] [1 error] +[./app.ts] 549 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js index 8bde8bb03..2915d7665 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/bundle.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("throw new Error(\"Module build failed (from C:/work/ts-loader/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/n/n at validateLoaderOptions (C://work//ts-loader//dist//index.js:155:19)/n at getLoaderOptions (C://work//ts-loader//dist//index.js:112:5)/n at Object.loader (C://work//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); +eval("throw new Error(\"Module build failed (from C:/source/ts-loader/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/n/n at validateLoaderOptions (C://source//ts-loader//dist//index.js:155:19)/n at getLoaderOptions (C://source//ts-loader//dist//index.js:112:5)/n at Object.loader (C://source//ts-loader//dist//index.js:16:21)\");\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }) diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt index 28984fe7f..698615f4f 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-3.6/output.txt @@ -1,7 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.63 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 879 bytes {main} [built] [failed] [1 error] +[./app.ts] 887 bytes {main} [built] [failed] [1 error] ERROR in ./app.ts Module build failed (from /index.js): diff --git a/yarn.lock b/yarn.lock index 57b5e111f..2f09d4dff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5345,9 +5345,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54" - integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw== + version "3.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz#fea942fabb20f7e1ca7164ff626f1a9f3f70b4da" + integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw== uglify-es@^3.3.4: version "3.3.9" From 767dd785e8faa173de05ad3994a95fdfc70271e1 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 19 Sep 2019 07:42:24 +0100 Subject: [PATCH 5/9] make comparison test tolerant of different spaces --- test/comparison-tests/create-and-execute-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/comparison-tests/create-and-execute-test.js b/test/comparison-tests/create-and-execute-test.js index 90eddf813..92835a7e2 100644 --- a/test/comparison-tests/create-and-execute-test.js +++ b/test/comparison-tests/create-and-execute-test.js @@ -402,9 +402,9 @@ function getNormalisedFileContent(file, location) { .replace(/Module build failed \(from \//gm, 'Module build failed (from ') .replace(/Module Warning \(from \//gm, 'Module Warning (from ') // We don't want a difference in the number of kilobytes to fail the build - .replace(/[\d]+([.][\d]*)? KiB/g, 'A-NUMBER-OF KiB') + .replace(/\s+[\d]+([.][\d]*)? KiB\s+/g, ' A-NUMBER-OF KiB ') // We also don't want a difference in the number of bytes to fail the build - .replace(/ \d+ bytes /g, ' A-NUMBER-OF bytes ') + .replace(/\s+\d+ bytes\s+/g, ' A-NUMBER-OF bytes ') // Ignore whitespace between: Asset Size Chunks Chunk Names .replace(/\s+Asset\s+Size\s+Chunks\s+Chunk Names/, ' Asset Size Chunks Chunk Names') .replace(/ test\/comparison-tests\//,' /test/comparison-tests/') From 43b9352802802dcac4a0c2f3b627f148213c1ec1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 19 Sep 2019 12:16:03 -0700 Subject: [PATCH 6/9] Fix when config includes referenced project sources and outputs as well --- src/after-compile.ts | 4 +- src/index.ts | 2 +- src/instances.ts | 1 - src/interfaces.ts | 2 +- src/servicesHost.ts | 6 +- src/watch-run.ts | 6 +- .../expectedOutput-3.6/output.txt | 6 +- .../projectReferencesRootDir/tsconfig.json | 3 +- .../app.ts | 3 + .../expectedOutput-3.6/bundle.js | 113 ++++++++++++++++++ .../expectedOutput-3.6/bundle.transpiled.js | 113 ++++++++++++++++++ .../expectedOutput-3.6/output.transpiled.txt | 5 + .../expectedOutput-3.6/output.txt | 7 ++ .../lib/out/index.d.ts | 5 + .../lib/out/index.js | 6 + .../lib/src/index.ts | 5 + .../lib/tsconfig.json | 12 ++ .../tsconfig.json | 8 ++ .../webpack.config.js | 20 ++++ 19 files changed, 309 insertions(+), 18 deletions(-) create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/app.ts create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.js create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.transpiled.js create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.transpiled.txt create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.txt create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.d.ts create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.js create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/src/index.ts create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesRootDirInvalidConfig/webpack.config.js diff --git a/src/after-compile.ts b/src/after-compile.ts index e81fe85de..c536fb49a 100644 --- a/src/after-compile.ts +++ b/src/after-compile.ts @@ -72,9 +72,8 @@ export function makeAfterCompile( provideTsBuildInfoFilesToWebpack(instance, compilation); instance.filesWithErrors = filesWithErrors; - instance.modifiedFiles = null; + instance.modifiedFiles = undefined; instance.projectsMissingSourceMaps = new Set(); - callback(); }; } @@ -90,7 +89,6 @@ function provideCompilerOptionDiagnosticErrorsToWebpack( ) { if (getCompilerOptionDiagnostics) { const { languageService, loaderOptions, compiler, program } = instance; - const errorsToAdd = formatErrors( program === undefined ? languageService!.getCompilerOptionsDiagnostics() diff --git a/src/index.ts b/src/index.ts index 8f418ef8e..eccea8ef9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -432,7 +432,7 @@ function updateFileInCache( } // push this file to modified files hash. - if (instance.modifiedFiles === null || instance.modifiedFiles === undefined) { + if (!instance.modifiedFiles) { instance.modifiedFiles = new Map(); } instance.modifiedFiles.set(filePath, file); diff --git a/src/instances.ts b/src/instances.ts index 94bc8f8a1..5c475238d 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -276,7 +276,6 @@ function successfulTypeScriptInstance( transformers: {} as typescript.CustomTransformers, // this is only set temporarily, custom transformers are created further down dependencyGraph: {}, reverseDependencyGraph: {}, - modifiedFiles: null, colors }); diff --git a/src/interfaces.ts b/src/interfaces.ts index debb858a5..304a1f82b 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -103,7 +103,7 @@ export interface TSInstance { /** * contains the modified files - cleared each time after-compile is called */ - modifiedFiles?: TSFiles | null; + modifiedFiles?: TSFiles; /** * Paths to project references that are missing source maps. * Cleared each time after-compile is called. Used to dedupe diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 971c4ec9a..3d1a7dcc9 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -13,6 +13,7 @@ import { ResolveSync, SolutionBuilderWithWatchHost, SolutionDiagnostics, + TSFile, TSInstance, WatchCallbacks, WatchFactory, @@ -385,7 +386,10 @@ export function updateFileWithText( file.text = newText; file.version++; instance.version!++; - instance.modifiedFiles!.set(nFilePath, file); + if (!instance.modifiedFiles) { + instance.modifiedFiles = new Map(); + } + instance.modifiedFiles.set(nFilePath, file); if (instance.watchHost !== undefined) { instance.watchHost.invokeFileWatcher( nFilePath, diff --git a/src/watch-run.ts b/src/watch-run.ts index cb773814f..737070f62 100644 --- a/src/watch-run.ts +++ b/src/watch-run.ts @@ -1,7 +1,7 @@ import * as webpack from 'webpack'; import * as constants from './constants'; -import { TSFile, TSInstance } from './interfaces'; +import { TSInstance } from './interfaces'; import { updateFileWithText } from './servicesHost'; import { readFile } from './utils'; @@ -14,10 +14,6 @@ export function makeWatchRun(instance: TSInstance) { const startTime = 0; return (compiler: webpack.Compiler, callback: () => void) => { - if (null === instance.modifiedFiles) { - instance.modifiedFiles = new Map(); - } - const times = compiler.fileTimestamps; for (const [filePath, date] of times) { if ( diff --git a/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.6/output.txt index f225f3d39..0e14f486e 100644 --- a/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.6/output.txt @@ -4,8 +4,4 @@ ../lib/tsconfig.tsbuildinfo 71.5 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 81 bytes {main} [built] -[./lib/src/index.ts] 66 bytes {main} [built] - -ERROR in tsconfig.json -[tsl] ERROR - TS5033: Could not write file '/.test/projectReferencesRootDir/lib/out/index.d.ts': Cannot read property 'set' of null. \ No newline at end of file +[./lib/src/index.ts] 66 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDir/tsconfig.json b/test/comparison-tests/projectReferencesRootDir/tsconfig.json index 22f6d31a1..9280cb221 100644 --- a/test/comparison-tests/projectReferencesRootDir/tsconfig.json +++ b/test/comparison-tests/projectReferencesRootDir/tsconfig.json @@ -1,7 +1,8 @@ { "compilerOptions": { - "target": "esnext", + "target": "esnext" }, + "files": ["./app.ts"], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/app.ts b/test/comparison-tests/projectReferencesRootDirInvalidConfig/app.ts new file mode 100644 index 000000000..8a8a50fad --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib/src/index'; + +console.log(lib.one, lib.two, lib.three); diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.js new file mode 100644 index 000000000..562a533e8 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.js @@ -0,0 +1,113 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./app.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./app.ts": +/*!****************!*\ + !*** ./app.ts ***! + \****************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _lib_src_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/src/index */ \"./lib/src/index.ts\");\n\nconsole.log(_lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].one, _lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].two, _lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].three);\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/src/index.ts": +/*!**************************!*\ + !*** ./lib/src/index.ts ***! + \**************************/ +/*! exports provided: lib */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\nconst lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/src/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.transpiled.js b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.transpiled.js new file mode 100644 index 000000000..4cd40bf50 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/bundle.transpiled.js @@ -0,0 +1,113 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./app.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./app.ts": +/*!****************!*\ + !*** ./app.ts ***! + \****************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _lib_src_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/src/index */ \"./lib/src/index.ts\");\n\nconsole.log(_lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].one, _lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].two, _lib_src_index__WEBPACK_IMPORTED_MODULE_0__[\"lib\"].three);\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/src/index.ts": +/*!**************************!*\ + !*** ./lib/src/index.ts ***! + \**************************/ +/*! exports provided: lib */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\nconst lib = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/src/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.transpiled.txt b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.transpiled.txt new file mode 100644 index 000000000..fa144b2cd --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.transpiled.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.65 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 81 bytes {main} [built] +[./lib/src/index.ts] 61 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.txt new file mode 100644 index 000000000..0e14f486e --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.6/output.txt @@ -0,0 +1,7 @@ + Asset Size Chunks Chunk Names + bundle.js 4.66 KiB main [emitted] main + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 71.5 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 81 bytes {main} [built] +[./lib/src/index.ts] 66 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.d.ts b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.d.ts new file mode 100644 index 000000000..73d752279 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.d.ts @@ -0,0 +1,5 @@ +export declare const lib: { + one: number; + two: number; + three: number; +}; diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.js b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.js new file mode 100644 index 000000000..601001a45 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/out/index.js @@ -0,0 +1,6 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/src/index.ts b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/src/index.ts new file mode 100644 index 000000000..669ca7b3d --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/src/index.ts @@ -0,0 +1,5 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/tsconfig.json b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/tsconfig.json new file mode 100644 index 000000000..85f8bf6f6 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/lib/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "esnext", + "composite": true, + "sourceMap": true, + "outDir": "./out", + "rootDir": "./src" + }, + "files": [ + "./src/index.ts" + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json b/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json new file mode 100644 index 000000000..cd33708ee --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "esnext" + }, + "references": [ + { "path": "./lib" } + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDirInvalidConfig/webpack.config.js b/test/comparison-tests/projectReferencesRootDirInvalidConfig/webpack.config.js new file mode 100644 index 000000000..1d80e4c54 --- /dev/null +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/webpack.config.js @@ -0,0 +1,20 @@ +var path = require('path') + +module.exports = { + mode: 'development', + entry: './app.ts', + output: { + filename: 'bundle.js' + }, + resolve: { + extensions: ['.ts', '.js'] + }, + module: { + rules: [ + { test: /\.ts$/, loader: 'ts-loader', options: { projectReferences: true } } + ] + } +} + +// for test harness purposes only, you would not need this in a normal project +module.exports.resolveLoader = { alias: { 'ts-loader': require('path').join(__dirname, "../../../index.js") } } From 686856bce60838d5f2baa3619592cc740b2761ce Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 19 Sep 2019 12:31:16 -0700 Subject: [PATCH 7/9] Always run comparison test without transpile --- test/comparison-tests/create-and-execute-test.js | 6 ++---- .../projectReferencesOutDir/expectedOutput-3.6/bundle.js | 2 +- .../projectReferencesOutDir/expectedOutput-3.6/output.txt | 8 +++++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/comparison-tests/create-and-execute-test.js b/test/comparison-tests/create-and-execute-test.js index 92835a7e2..cd3bbbca9 100644 --- a/test/comparison-tests/create-and-execute-test.js +++ b/test/comparison-tests/create-and-execute-test.js @@ -52,10 +52,8 @@ if (fs.statSync(testPath).isDirectory() && // @ts-ignore describe(`${testToRun}${extraOption ? ` - ${extraOption}: true` : ''}`, function () { - if (testToRun !== 'projectReferencesOutDir' || require('os').platform() !== 'win32') { - // @ts-ignore - it('should have the correct output', createTest(testToRun, testPath, {})); - } + // @ts-ignore + it('should have the correct output', createTest(testToRun, testPath, {})); if (testToRun === 'declarationOutput' || testToRun === 'declarationOutputWithMaps' || diff --git a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/bundle.js b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/bundle.js index 0f1d8bc9b..7b491a754 100644 --- a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/bundle.js +++ b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/bundle.js @@ -106,7 +106,7 @@ eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/output.txt b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/output.txt index 5d7048512..ad97fb13b 100644 --- a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/output.txt +++ b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.6/output.txt @@ -1,5 +1,7 @@ - Asset Size Chunks Chunk Names -bundle.js 4.28 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 71 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 97 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file From ab14f9772ad8329208cc3a1bcc31dafc41aac31f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 19 Sep 2019 12:58:30 -0700 Subject: [PATCH 8/9] ignore case when matching file paths --- test/comparison-tests/create-and-execute-test.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/comparison-tests/create-and-execute-test.js b/test/comparison-tests/create-and-execute-test.js index cd3bbbca9..0b98a060f 100644 --- a/test/comparison-tests/create-and-execute-test.js +++ b/test/comparison-tests/create-and-execute-test.js @@ -388,7 +388,6 @@ function getNormalisedFileContent(file, location) { /** @type {string} */ let fileContent; const filePath = path.join(location, file); - try { const originalContent = fs.readFileSync(filePath).toString(); fileContent = (file.indexOf('output.') === 0 @@ -420,11 +419,11 @@ function getNormalisedFileContent(file, location) { return 'at ' + remainingPathAndColon + 'irrelevant-line-number' + colon + 'irrelevant-column-number'; }) // strip C:/projects/ts-loader/.test/ - .replace(/(C\:\/)?[\w|\/]*\/(ts-loader|workspace)\/\.test/g, '') - .replace(/webpack:\/\/(C:\/)?[\w|\/|-]*\/comparison-tests\//g, 'webpack://comparison-tests/') - .replace(/WEBPACK FOOTER\/n\/ (C:\/)?[\w|\/|-]*\/comparison-tests\//g, 'WEBPACK FOOTER/n/ /ts-loader/test/comparison-tests/') - .replace(/!\** (C\:\/)?[\w|\/|-]*\/comparison-tests\//g, '!*** /ts-loader/test/comparison-tests/') - .replace(/\/ (C\:\/)?[\w|\/|-]*\/comparison-tests\//g, '/ /ts-loader/test/comparison-tests/') + .replace(/(C\:\/)?[\w|\/]*\/(ts-loader|workspace)\/\.test/ig, '') + .replace(/webpack:\/\/(C:\/)?[\w|\/|-]*\/comparison-tests\//ig, 'webpack://comparison-tests/') + .replace(/WEBPACK FOOTER\/n\/ (C:\/)?[\w|\/|-]*\/comparison-tests\//ig, 'WEBPACK FOOTER/n/ /ts-loader/test/comparison-tests/') + .replace(/!\** (C\:\/)?[\w|\/|-]*\/comparison-tests\//ig, '!*** /ts-loader/test/comparison-tests/') + .replace(/\/ (C\:\/)?[\w|\/|-]*\/comparison-tests\//ig, '/ /ts-loader/test/comparison-tests/') // with webpack 4 there are different numbers of *s on Windows and on Linux .replace(/\*{10}\**/g, '**********'); } catch (e) { From ab890a3855666652d08acc4130de4acebe17ff84 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 20 Sep 2019 06:18:23 +0100 Subject: [PATCH 9/9] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6110aeac8..1783912bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## v6.1.1 -* [Fix SolutionBuilder watches](https://github.com/TypeStrong/ts-loader/pull/1003) (#998) - thanks @sheetalkamat! +* [Fix SolutionBuilder watches](https://github.com/TypeStrong/ts-loader/pull/1003) and [related fixes](https://github.com/TypeStrong/ts-loader/pull/1011) (#998) - thanks @sheetalkamat! * [fix: no errors reported if flagged with @ts-check](https://github.com/TypeStrong/ts-loader/pull/1008) (#1004) - thanks @reinholdk! ## v6.1.0