From 2f6cbe84777e07364f89be5db97d1a02358554c5 Mon Sep 17 00:00:00 2001 From: Nick Excell Date: Sat, 1 Aug 2020 06:29:24 +0100 Subject: [PATCH] Fix 2 issues with experimentalWatchApi (#1159) * Detect if files already updated by watchAPI * Only put files in cache if processed by loaders * Update comparison tests * Remove npm command for debugging tests * Remove package-lock.json * Update version & Changelog Co-authored-by: John Reilly --- CHANGELOG.md | 4 ++ package.json | 2 +- src/index.ts | 5 ++ src/instances.ts | 7 ++- .../expectedOutput-3.9/patch2/bundle.js | 2 +- .../expectedOutput-3.9/patch2/output.txt | 9 +-- .../patch2/tsconfig.tsbuildinfo | 63 +++++++++++++++++++ .../expectedOutput-3.9/patch2/bundle.js | 2 +- .../expectedOutput-3.9/patch1/bundle.js | 2 +- .../expectedOutput-3.9/patch1/output.txt | 9 +-- .../patch1/tsconfig.tsbuildinfo | 63 +++++++++++++++++++ .../expectedOutput-3.9/patch1/bundle.js | 2 +- .../expectedOutput-3.9/patch1/bundle.js | 2 +- .../expectedOutput-3.9/patch1/output.txt | 9 +-- .../patch1/tsconfig.tsbuildinfo | 57 +++++++++++++++++ .../expectedOutput-3.9/patch2/bundle.js | 2 +- .../expectedOutput-3.9/patch4/bundle.js | 4 +- .../expectedOutput-3.9/patch4/output.txt | 16 +++-- .../patch4/tsconfig.tsbuildinfo | 57 +++++++++++++++++ .../expectedOutput-3.9/patch5/bundle.js | 4 +- .../expectedOutput-3.9/patch5/output.txt | 9 +-- .../patch5/tsconfig.tsbuildinfo | 57 +++++++++++++++++ .../expectedOutput-3.9/patch1/bundle.js | 2 +- .../expectedOutput-3.9/patch2/bundle.js | 2 +- .../expectedOutput-3.9/patch4/bundle.js | 4 +- .../expectedOutput-3.9/patch4/output.txt | 11 +++- .../expectedOutput-3.9/patch5/bundle.js | 4 +- 27 files changed, 366 insertions(+), 44 deletions(-) create mode 100644 test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/tsconfig.tsbuildinfo create mode 100644 test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo create mode 100644 test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo create mode 100644 test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/tsconfig.tsbuildinfo create mode 100644 test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/tsconfig.tsbuildinfo diff --git a/CHANGELOG.md b/CHANGELOG.md index 33256c9ef..fd163e33d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v8.0.2 + +* [Fix 2 issues with experimentalWatchApi](https://github.com/TypeStrong/ts-loader/pull/1159) - thanks @appzuka + ## v8.0.1 * [Fix webpack deprecations](https://github.com/TypeStrong/ts-loader/pull/1135) - thanks @g-plane diff --git a/package.json b/package.json index 1f6f64178..271986286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "8.0.1", + "version": "8.0.2", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", diff --git a/src/index.ts b/src/index.ts index b218a4611..3ffde8dc0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -383,6 +383,11 @@ function updateFileInCache( } } + // Added in case the files were already updated by the watch API + if (instance.modifiedFiles && instance.modifiedFiles.get(key)) { + fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Changed; + } + if (instance.watchHost !== undefined && fileWatcherEventKind !== undefined) { instance.hasUnaccountedModifiedFiles = instance.watchHost.invokeFileWatcher(filePath, fileWatcherEventKind) || diff --git a/src/instances.ts b/src/instances.ts index 916f139b4..18a0c18a9 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -689,15 +689,16 @@ export function getEmitFromWatchHost(instance: TSInstance, filePath?: string) { if (!result) { break; } - if ((result.affected as typescript.SourceFile).fileName) { + + // Only put the output file in the cache if the source came from webpack and + // was processed by the loaders + if (result.affected === sourceFile) { instance.watchHost!.outputFiles.set( instance.filePathKeyMapper( (result.affected as typescript.SourceFile).fileName ), outputFiles.slice() ); - } - if (result.affected === sourceFile) { return outputFiles; } } diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js index 2919f8072..cd02ff9fa 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar helper_1 = __webpack_require__(/*! ./lib/helper */ \"./lib/helper.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, helper_1.helper.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/output.txt index f4090c92e..0097b02fd 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/output.txt @@ -1,7 +1,8 @@ - Asset Size Chunks Chunk Names - app.d.ts 11 bytes [emitted] -bundle.js 4.85 KiB main [emitted] main + Asset Size Chunks Chunk Names + app.d.ts 11 bytes [emitted] + bundle.js 4.97 KiB main [emitted] main +tsconfig.tsbuildinfo 1.72 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} [built] +[./app.ts] 215 bytes {main} [built] [./lib/helper.ts] 138 bytes {main} [./lib/index.ts] 224 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/tsconfig.tsbuildinfo b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/tsconfig.tsbuildinfo new file mode 100644 index 000000000..7a61c29f6 --- /dev/null +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.9/patch2/tsconfig.tsbuildinfo @@ -0,0 +1,63 @@ +{ + "program": { + "fileInfos": { + "../../node_modules/typescript/lib/lib.d.ts": { + "version": "-10496480823", + "signature": "-10496480823", + "affectsGlobalScope": false + }, + "../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "-218882352090", + "signature": "-218882352090", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "300634082611", + "signature": "300634082611", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "-24714112149", + "signature": "-24714112149", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "204309182321", + "signature": "204309182321", + "affectsGlobalScope": true + }, + "./lib/index.d.ts": { + "version": "11215156582", + "signature": "11215156582", + "affectsGlobalScope": false + }, + "./lib/helper.d.ts": { + "version": "7897218607", + "signature": "7897218607", + "affectsGlobalScope": false + }, + "./app.ts": { + "version": "-12553192154", + "signature": "-3531856636", + "affectsGlobalScope": false + } + }, + "options": { + "types": [], + "composite": true, + "newLine": 1, + "configFilePath": "./tsconfig.json", + "skipLibCheck": true, + "suppressOutputPathCheck": true + }, + "referencedMap": { + "./app.ts": [ + "./lib/helper.d.ts", + "./lib/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [] + }, + "version": "3.9.3" +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.9/patch2/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.9/patch2/bundle.js index 2919f8072..cd02ff9fa 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.9/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.9/patch2/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar helper_1 = __webpack_require__(/*! ./lib/helper */ \"./lib/helper.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, helper_1.helper.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js index 4cb2a7cd8..bac3c372e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar helper_1 = __webpack_require__(/*! ./lib/helper */ \"./lib/helper.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, helper_1.helper.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt index f411b5b56..4b6636b9a 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt @@ -1,7 +1,8 @@ - Asset Size Chunks Chunk Names - app.d.ts 11 bytes [emitted] -bundle.js 4.83 KiB main [emitted] main + Asset Size Chunks Chunk Names + app.d.ts 11 bytes [emitted] + bundle.js 4.95 KiB main [emitted] main +tsconfig.tsbuildinfo 1.72 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} [built] +[./app.ts] 215 bytes {main} [built] [./lib/helper.ts] 138 bytes {main} [./lib/index.ts] 211 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo new file mode 100644 index 000000000..8948acda4 --- /dev/null +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo @@ -0,0 +1,63 @@ +{ + "program": { + "fileInfos": { + "../../node_modules/typescript/lib/lib.d.ts": { + "version": "-10496480823", + "signature": "-10496480823", + "affectsGlobalScope": false + }, + "../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "-218882352090", + "signature": "-218882352090", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "300634082611", + "signature": "300634082611", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "-24714112149", + "signature": "-24714112149", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "204309182321", + "signature": "204309182321", + "affectsGlobalScope": true + }, + "./lib/index.d.ts": { + "version": "12503634626", + "signature": "12503634626", + "affectsGlobalScope": false + }, + "./lib/helper.d.ts": { + "version": "7897218607", + "signature": "7897218607", + "affectsGlobalScope": false + }, + "./app.ts": { + "version": "-12553192154", + "signature": "-3531856636", + "affectsGlobalScope": false + } + }, + "options": { + "types": [], + "composite": true, + "newLine": 1, + "configFilePath": "./tsconfig.json", + "skipLibCheck": true, + "suppressOutputPathCheck": true + }, + "referencedMap": { + "./app.ts": [ + "./lib/helper.d.ts", + "./lib/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [] + }, + "version": "3.9.3" +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.9/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.9/patch1/bundle.js index 4cb2a7cd8..bac3c372e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.9/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.9/patch1/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar helper_1 = __webpack_require__(/*! ./lib/helper */ \"./lib/helper.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, helper_1.helper.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js index 07f654ffd..8cf5e9561 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt index 9d2e9103e..f890173c0 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/output.txt @@ -1,6 +1,7 @@ - Asset Size Chunks Chunk Names - app.d.ts 11 bytes [emitted] -bundle.js 4.33 KiB main [emitted] main + Asset Size Chunks Chunk Names + app.d.ts 11 bytes [emitted] + bundle.js 4.37 KiB main [emitted] main +tsconfig.tsbuildinfo 1.56 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} [built] +[./app.ts] 169 bytes {main} [built] [./lib/index.ts] 150 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo new file mode 100644 index 000000000..6711c9bdf --- /dev/null +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch1/tsconfig.tsbuildinfo @@ -0,0 +1,57 @@ +{ + "program": { + "fileInfos": { + "../../node_modules/typescript/lib/lib.d.ts": { + "version": "-10496480823", + "signature": "-10496480823", + "affectsGlobalScope": false + }, + "../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "-218882352090", + "signature": "-218882352090", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "300634082611", + "signature": "300634082611", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "-24714112149", + "signature": "-24714112149", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "204309182321", + "signature": "204309182321", + "affectsGlobalScope": true + }, + "./lib/index.d.ts": { + "version": "11215156582", + "signature": "11215156582", + "affectsGlobalScope": false + }, + "./app.ts": { + "version": "-16299197056", + "signature": "-3531856636", + "affectsGlobalScope": false + } + }, + "options": { + "types": [], + "composite": true, + "newLine": 1, + "configFilePath": "./tsconfig.json", + "skipLibCheck": true, + "suppressOutputPathCheck": true + }, + "referencedMap": { + "./app.ts": [ + "./lib/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [] + }, + "version": "3.9.3" +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js index 07f654ffd..8cf5e9561 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch2/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/bundle.js index 8d307dba8..d45f528f1 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four, lib_1.lib.ffive); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), @@ -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.lib = void 0;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4,\r\n five: 5\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/output.txt index 6f38dea0a..5367b0c7d 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/output.txt @@ -1,6 +1,12 @@ - Asset Size Chunks Chunk Names - app.d.ts 11 bytes [emitted] -bundle.js 4.37 KiB main [emitted] main + Asset Size Chunks Chunk Names + app.d.ts 11 bytes [emitted] + bundle.js 4.38 KiB main [emitted] main +tsconfig.tsbuildinfo 1.56 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 169 bytes {main} [built] -[./lib/index.ts] 145 bytes {main} \ No newline at end of file +[./app.ts] 186 bytes {main} [built] [1 error] +[./lib/index.ts] 145 bytes {main} + +ERROR in app.ts +./app.ts +[tsl] ERROR in app.ts(3,56) + TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/tsconfig.tsbuildinfo b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/tsconfig.tsbuildinfo new file mode 100644 index 000000000..fa9efb48d --- /dev/null +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch4/tsconfig.tsbuildinfo @@ -0,0 +1,57 @@ +{ + "program": { + "fileInfos": { + "../../node_modules/typescript/lib/lib.d.ts": { + "version": "-10496480823", + "signature": "-10496480823", + "affectsGlobalScope": false + }, + "../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "-218882352090", + "signature": "-218882352090", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "300634082611", + "signature": "300634082611", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "-24714112149", + "signature": "-24714112149", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "204309182321", + "signature": "204309182321", + "affectsGlobalScope": true + }, + "./lib/index.d.ts": { + "version": "11496633944", + "signature": "11496633944", + "affectsGlobalScope": false + }, + "./app.ts": { + "version": "-26657554079", + "signature": "-3531856636", + "affectsGlobalScope": false + } + }, + "options": { + "types": [], + "composite": true, + "newLine": 1, + "configFilePath": "./tsconfig.json", + "skipLibCheck": true, + "suppressOutputPathCheck": true + }, + "referencedMap": { + "./app.ts": [ + "./lib/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [] + }, + "version": "3.9.3" +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/bundle.js index 8d307dba8..064d19ca9 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four, lib_1.lib.five); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), @@ -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.lib = void 0;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4,\r\n five: 5\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/output.txt index 6f38dea0a..d5d29912d 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/output.txt @@ -1,6 +1,7 @@ - Asset Size Chunks Chunk Names - app.d.ts 11 bytes [emitted] -bundle.js 4.37 KiB main [emitted] main + Asset Size Chunks Chunk Names + app.d.ts 11 bytes [emitted] + bundle.js 4.38 KiB main [emitted] main +tsconfig.tsbuildinfo 1.56 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 169 bytes {main} [built] +[./app.ts] 185 bytes {main} [built] [./lib/index.ts] 145 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/tsconfig.tsbuildinfo b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/tsconfig.tsbuildinfo new file mode 100644 index 000000000..d9e5cda2c --- /dev/null +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.9/patch5/tsconfig.tsbuildinfo @@ -0,0 +1,57 @@ +{ + "program": { + "fileInfos": { + "../../node_modules/typescript/lib/lib.d.ts": { + "version": "-10496480823", + "signature": "-10496480823", + "affectsGlobalScope": false + }, + "../../node_modules/typescript/lib/lib.es5.d.ts": { + "version": "-218882352090", + "signature": "-218882352090", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.dom.d.ts": { + "version": "300634082611", + "signature": "300634082611", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts": { + "version": "-24714112149", + "signature": "-24714112149", + "affectsGlobalScope": true + }, + "../../node_modules/typescript/lib/lib.scripthost.d.ts": { + "version": "204309182321", + "signature": "204309182321", + "affectsGlobalScope": true + }, + "./lib/index.d.ts": { + "version": "11496633944", + "signature": "11496633944", + "affectsGlobalScope": false + }, + "./app.ts": { + "version": "-21839530949", + "signature": "-3531856636", + "affectsGlobalScope": false + } + }, + "options": { + "types": [], + "composite": true, + "newLine": 1, + "configFilePath": "./tsconfig.json", + "skipLibCheck": true, + "suppressOutputPathCheck": true + }, + "referencedMap": { + "./app.ts": [ + "./lib/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [] + }, + "version": "3.9.3" +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch1/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch1/bundle.js index 07f654ffd..8cf5e9561 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch1/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch2/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch2/bundle.js index 07f654ffd..8cf5e9561 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch2/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/bundle.js index 8d307dba8..d45f528f1 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four, lib_1.lib.ffive); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), @@ -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.lib = void 0;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4,\r\n five: 5\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/output.txt index f6dac8932..e5095f9ca 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch4/output.txt @@ -1,5 +1,10 @@ Asset Size Chunks Chunk Names -bundle.js 4.31 KiB main [emitted] main +bundle.js 4.38 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} [built] -[./lib/index.ts] 123 bytes {main} \ No newline at end of file +[./app.ts] 186 bytes {main} [built] [1 error] +[./lib/index.ts] 145 bytes {main} + +ERROR in app.ts +./app.ts +[tsl] ERROR in app.ts(3,56) + TS2551: Property 'ffive' does not exist on type '{ one: number; two: number; three: number; four: number; five: number; }'. Did you mean 'five'? \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch5/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch5/bundle.js index 8d307dba8..064d19ca9 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch5/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.9/patch5/bundle.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three, lib_1.lib.four, lib_1.lib.five); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); /***/ }), @@ -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.lib = void 0;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4,\r\n five: 5\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\nexports.__esModule = true;\nexports.lib = void 0;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ })