From 1908a470a6e2a2efc0b6c44b24a8793765830aa2 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 14 Apr 2020 21:54:55 -0700 Subject: [PATCH] Project reference support enhancements (#1076) * Add test for package json existance * Add input file of reference as dependency instead of .d.ts file * Show how output is different when module resolution resolves to .js/.d.ts * Store tsbuildinfos written on solution builder host and hand it off as asset * .d.ts as assets only if written * Make every project include just app and not other lib files * Fix watching for solution watched files Add test that doesnt pass yet. This is same as projectReferencesWatch so technically only change should be in bundled emit to have out to be lib\out\index.js instead * Dont depend on .d.ts output of the referenced project since we are depending on .ts file for that This fixes initial build to complete in single pass * Make sure to build all solution builder files before and track input and output * Add all the files from composite project as dependencies as any change in them can result in errors resulting in changes to the own output of the file * Get output from solutionBuilder for referenced files in transpileOnly mode as well * Read and write output files from referenced projects to disk * Test on already built * Handle written files by solution builder a bit better * Fix comparison tests where the multiple compilation callbacks were not handled so it didnt show correct output * Because comparison tests are run only on newer typescript build, build suite during tests instead of commandline to avoid breaking older runs * Remove node 8 build from travis * Fix test baselines * Revert multiple compilation stats per patch, has incorrect baseline that doesnt match actual behavior This reverts commit 9d62b440df00d79a1aaf59c62f992201daabec4a. * update package.json and CHANGELOG.md Co-authored-by: John Reilly --- .travis.yml | 1 - CHANGELOG.md | 4 + package.json | 4 +- src/after-compile.ts | 132 +++--- src/index.ts | 308 ++++++++++---- src/instances.ts | 398 ++++++++++-------- src/interfaces.ts | 54 ++- src/servicesHost.ts | 382 +++++++++++++++-- src/utils.ts | 16 +- src/watch-run.ts | 40 +- .../expectedOutput-3.8/output.txt | 2 +- .../create-and-execute-test.js | 19 +- test/comparison-tests/getProgram.js | 12 + .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../projectReferences/tsconfig.json | 3 + .../projectReferencesMultiple/app.ts | 5 + .../projectReferencesMultiple/common/index.ts | 3 + .../common/tsconfig.json | 5 + .../expectedOutput-3.8/bundle.js | 123 ++++++ .../expectedOutput-3.8/output.txt | 39 ++ .../expectedOutput-3.8/patch0/bundle.js | 124 ++++++ .../expectedOutput-3.8/patch0/output.txt | 23 + .../expectedOutput-3.8/patch1/bundle.js | 137 ++++++ .../expectedOutput-3.8/patch1/output.txt | 15 + .../expectedOutput-3.8/patch2/bundle.js | 137 ++++++ .../expectedOutput-3.8/patch2/output.txt | 10 + .../expectedOutput-3.8/patch3/bundle.js | 137 ++++++ .../expectedOutput-3.8/patch3/output.txt | 11 + .../expectedOutput-3.8/patch4/bundle.js | 137 ++++++ .../expectedOutput-3.8/patch4/output.txt | 10 + .../expectedOutput-3.8/patch5/bundle.js | 137 ++++++ .../expectedOutput-3.8/patch5/output.txt | 11 + .../expectedOutput-transpile-3.8/bundle.js | 123 ++++++ .../expectedOutput-transpile-3.8/output.txt | 37 ++ .../patch0/bundle.js | 124 ++++++ .../patch0/output.txt | 22 + .../patch1/bundle.js | 137 ++++++ .../patch1/output.txt | 15 + .../patch3/output.txt | 10 + .../patch4/output.txt | 10 + .../patch5/output.txt | 10 + .../indirectWithError/fileWithError.ts | 3 + .../indirectWithError/index.ts | 5 + .../indirectWithError/tsconfig.json | 5 + .../lib/fileWithError.ts | 3 + .../projectReferencesMultiple/lib/index.ts | 5 + .../lib/tsconfig.json | 5 + .../patch0/lib/fileWithError.ts | 3 + .../patch1/indirectWithError/fileWithError.ts | 3 + .../patch2/unreferenced/index.ts | 3 + .../patch3/unreferencedIndirect/index.ts | 3 + .../patch4/unreferencedIndirect/index.ts | 3 + .../patch5/unreferenced/index.ts | 3 + .../projectReferencesMultiple/tsconfig.json | 10 + .../unreferenced/index.ts | 3 + .../unreferenced/tsconfig.json | 8 + .../unreferencedIndirect/index.ts | 3 + .../unreferencedIndirect/tsconfig.json | 5 + .../projectReferencesMultiple/utils/index.ts | 4 + .../utils/tsconfig.json | 9 + .../webpack.config.js | 21 + .../expectedOutput-3.8/output.txt | 2 + .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../expectedOutput-transpile-3.8/output.txt | 13 +- .../tsconfig.json | 3 + .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../projectReferencesNotBuilt/tsconfig.json | 3 + .../expectedOutput-3.8/output.txt | 14 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../expectedOutput-3.8/output.txt | 12 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../tsconfig.json | 3 + .../expectedOutput-3.8/output.txt | 16 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../expectedOutput-3.8/output.txt | 12 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../expectedOutput-3.8/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 20 +- .../tsconfig.json | 3 + .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 16 +- .../expectedOutput-3.8/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 20 +- .../expectedOutput-3.8/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 20 +- .../tsconfig.json | 3 + .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 16 +- .../expectedOutput-3.8/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 5 +- .../expectedOutput-transpile-3.8/output.txt | 20 +- .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../projectReferencesOutDir/tsconfig.json | 3 + .../app.ts | 3 + .../expectedOutput-3.8/bundle.js | 113 +++++ .../expectedOutput-3.8/output.txt | 9 + .../expectedOutput-3.8/patch0/bundle.js | 113 +++++ .../expectedOutput-3.8/patch0/output.txt | 9 + .../expectedOutput-3.8/patch1/bundle.js | 113 +++++ .../expectedOutput-3.8/patch1/output.txt | 5 + .../expectedOutput-3.8/patch2/bundle.js | 113 +++++ .../expectedOutput-3.8/patch2/output.txt | 15 + .../expectedOutput-3.8/patch3/bundle.js | 113 +++++ .../expectedOutput-3.8/patch3/output.txt | 9 + .../expectedOutput-3.8/patch4/bundle.js | 113 +++++ .../expectedOutput-3.8/patch4/output.txt | 10 + .../expectedOutput-3.8/patch5/bundle.js | 113 +++++ .../expectedOutput-3.8/patch5/output.txt | 5 + .../expectedOutput-transpile-3.8/bundle.js | 113 +++++ .../expectedOutput-transpile-3.8/output.txt | 9 + .../patch0/bundle.js | 113 +++++ .../patch0/output.txt | 9 + .../patch1/bundle.js | 113 +++++ .../patch1/output.txt | 5 + .../patch2/bundle.js | 113 +++++ .../patch2/output.txt | 11 + .../patch3/bundle.js | 113 +++++ .../patch3/output.txt | 9 + .../patch4/bundle.js | 113 +++++ .../patch4/output.txt | 5 + .../patch5/bundle.js | 113 +++++ .../patch5/output.txt | 5 + .../lib/.gitignore | 1 + .../lib/index.ts | 5 + .../lib/package.json | 12 + .../lib/tsconfig.json | 10 + .../patch0/lib/index.ts | 6 + .../patch1/app.ts | 3 + .../patch2/lib/index.ts | 7 + .../patch3/lib/index.ts | 7 + .../patch4/app.ts | 3 + .../patch5/app.ts | 3 + .../tsconfig.json | 8 + .../webpack.config.js | 20 + .../app.ts | 3 + .../expectedOutput-3.8/bundle.js | 113 +++++ .../expectedOutput-3.8/output.txt | 5 + .../expectedOutput-3.8/patch0/bundle.js | 113 +++++ .../expectedOutput-3.8/patch0/output.txt | 9 + .../expectedOutput-3.8/patch1/bundle.js | 113 +++++ .../expectedOutput-3.8/patch1/output.txt | 5 + .../expectedOutput-3.8/patch2/bundle.js | 113 +++++ .../expectedOutput-3.8/patch2/output.txt | 13 + .../expectedOutput-3.8/patch3/bundle.js | 113 +++++ .../expectedOutput-3.8/patch3/output.txt | 9 + .../expectedOutput-3.8/patch4/bundle.js | 113 +++++ .../expectedOutput-3.8/patch4/output.txt | 10 + .../expectedOutput-3.8/patch5/bundle.js | 113 +++++ .../expectedOutput-3.8/patch5/output.txt | 5 + .../expectedOutput-transpile-3.8/bundle.js | 113 +++++ .../expectedOutput-transpile-3.8/output.txt | 5 + .../patch1/bundle.js | 113 +++++ .../patch1/output.txt | 5 + .../patch2/output.txt | 11 + .../patch3/output.txt | 9 + .../patch4/bundle.js | 113 +++++ .../patch4/output.txt | 5 + .../patch5/bundle.js | 113 +++++ .../patch5/output.txt | 5 + .../lib/.gitignore | 1 + .../lib/index.ts | 5 + .../lib/package.json | 12 + .../lib/tsconfig.json | 10 + .../patch0/lib/index.ts | 6 + .../patch1/app.ts | 3 + .../patch2/lib/index.ts | 7 + .../patch3/lib/index.ts | 7 + .../patch4/app.ts | 3 + .../patch5/app.ts | 3 + .../tsconfig.json | 8 + .../webpack.config.js | 20 + .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../tsconfig.json | 15 +- .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-3.8/patch0/output.txt | 2 + .../expectedOutput-3.8/patch2/output.txt | 10 +- .../expectedOutput-3.8/patch3/output.txt | 2 + .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../patch0/bundle.js | 2 +- .../patch0/output.txt | 12 +- .../patch1/bundle.js | 2 +- .../patch2/bundle.js | 2 +- .../patch2/output.txt | 10 +- .../patch3/bundle.js | 2 +- .../patch3/output.txt | 12 +- .../patch4/bundle.js | 2 +- .../patch5/bundle.js | 2 +- .../expectedOutput-3.8/output.txt | 14 +- .../expectedOutput-3.8/patch0/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../expectedOutput-transpile-3.8/output.txt | 15 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 7 +- .../expectedOutput-3.8/patch0/output.txt | 9 +- .../expectedOutput-3.8/patch1/output.txt | 6 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../patch1/output.txt | 17 +- .../patch2/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 11 +- .../expectedOutput-3.8/patch0/output.txt | 11 +- .../expectedOutput-3.8/patch1/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../patch1/output.txt | 17 +- .../patch2/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 7 +- .../expectedOutput-3.8/patch0/output.txt | 9 +- .../expectedOutput-3.8/patch1/output.txt | 8 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../patch1/output.txt | 17 +- .../patch2/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 18 +- .../expectedOutput-3.8/patch0/output.txt | 10 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../expectedOutput-transpile-3.8/output.txt | 15 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 14 +- .../expectedOutput-3.8/patch0/output.txt | 8 +- .../expectedOutput-transpile-3.8/bundle.js | 4 +- .../expectedOutput-transpile-3.8/output.txt | 15 +- .../patch0/bundle.js | 4 +- .../patch0/output.txt | 17 +- .../patch1/bundle.js | 4 +- .../expectedOutput-3.8/output.txt | 14 +- .../expectedOutput-3.8/patch0/output.txt | 4 +- .../expectedOutput-3.8/patch2/output.txt | 12 +- .../expectedOutput-3.8/patch3/output.txt | 4 +- .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../patch0/bundle.js | 2 +- .../patch0/output.txt | 12 +- .../patch1/bundle.js | 2 +- .../patch2/bundle.js | 2 +- .../patch2/output.txt | 10 +- .../patch3/bundle.js | 2 +- .../patch3/output.txt | 12 +- .../patch4/bundle.js | 2 +- .../patch5/bundle.js | 2 +- .../expectedOutput-3.8/output.txt | 10 +- .../expectedOutput-3.8/patch0/output.txt | 2 + .../expectedOutput-3.8/patch2/output.txt | 10 +- .../expectedOutput-3.8/patch3/output.txt | 2 + .../expectedOutput-transpile-3.8/bundle.js | 2 +- .../expectedOutput-transpile-3.8/output.txt | 10 +- .../patch0/bundle.js | 2 +- .../patch0/output.txt | 12 +- .../patch1/bundle.js | 2 +- .../patch2/bundle.js | 2 +- .../patch2/output.txt | 10 +- .../patch3/bundle.js | 2 +- .../patch3/output.txt | 12 +- .../patch4/bundle.js | 2 +- .../patch5/bundle.js | 2 +- test/comparison-tests/run-tests.js | 18 + test/comparison-tests/tsconfig.json | 1 + 287 files changed, 6574 insertions(+), 825 deletions(-) create mode 100644 test/comparison-tests/getProgram.js create mode 100644 test/comparison-tests/projectReferencesMultiple/app.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/common/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/common/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesMultiple/indirectWithError/fileWithError.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/indirectWithError/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/indirectWithError/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/lib/fileWithError.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/lib/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/patch0/lib/fileWithError.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/patch1/indirectWithError/fileWithError.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/patch2/unreferenced/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/patch3/unreferencedIndirect/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/patch4/unreferencedIndirect/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/patch5/unreferenced/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/unreferenced/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/unreferenced/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/utils/index.ts create mode 100644 test/comparison-tests/projectReferencesMultiple/utils/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesMultiple/webpack.config.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/.gitignore create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/package.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch0/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch1/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch2/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch3/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch4/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/patch5/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJson/webpack.config.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch2/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch3/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/bundle.js create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/output.txt create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/.gitignore create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/package.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch0/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch1/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch2/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch3/lib/index.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch4/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch5/app.ts create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/tsconfig.json create mode 100644 test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/webpack.config.js diff --git a/.travis.yml b/.travis.yml index c04617ec2..978dd1bf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ addons: chrome: stable language: node_js node_js: - - "8" - "10" - "12" sudo: required diff --git a/CHANGELOG.md b/CHANGELOG.md index cb7fe1ebc..19489e522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v7.0.0 +* [Project reference support enhancements](https://github.com/TypeStrong/ts-loader/pull/1076) - thanks @sheetalkamat! +* Following the end of life of Node 8, `ts-loader` no longer supports Node 8 **BREAKING CHANGE** + ## v6.2.2 * [Enable typescript 3.8.3 support when using `webpack.config.ts` files](https://github.com/TypeStrong/ts-loader/issues/1072) - thanks @vladimiry! diff --git a/package.json b/package.json index d9976b510..375e3e539 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "ts-loader", - "version": "6.2.2", + "version": "7.0.0", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", "scripts": { "build": "tsc --version && tsc --project \"./src\"", "lint": "tslint --project \"./src\"", - "comparison-tests": "git clean -xfd test/comparison-tests && tsc --project \"./test/comparison-tests\" && npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js", + "comparison-tests": "git clean -xfd test/comparison-tests && npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js", "comparison-tests-generate": "git clean -xfd test/comparison-tests && node test/comparison-tests/stub-new-version.js", "execution-tests": "git clean -xfd test/execution-tests && node test/execution-tests/run-tests.js", "test": "git clean -xfd test/comparison-tests && git clean -xfd test/execution-tests && node test/run-tests.js", diff --git a/src/after-compile.ts b/src/after-compile.ts index 517eb6f64..8fbe6f0ed 100644 --- a/src/after-compile.ts +++ b/src/after-compile.ts @@ -4,9 +4,9 @@ import * as webpack from 'webpack'; import * as constants from './constants'; import { - forEachResolvedProjectReference, getEmitFromWatchHost, - getEmitOutput + getEmitOutput, + isReferencedFile } from './instances'; import { TSFile, @@ -39,6 +39,12 @@ export function makeAfterCompile( return; } + if (instance.loaderOptions.transpileOnly) { + provideAssetsFromSolutionBuilderHost(instance, compilation); + callback(); + return; + } + removeTSLoaderErrors(compilation.errors); provideCompilerOptionDiagnosticErrorsToWebpack( @@ -65,15 +71,15 @@ export function makeAfterCompile( modules, instance ); - provideDeclarationFilesToWebpack( filesToCheckForErrors, instance, compilation ); + provideTsBuildInfoFilesToWebpack(instance, compilation); provideSolutionErrorsToWebpack(compilation, modules, instance); - provideTsBuildInfoFilesToWebpack(instance, compilation); + provideAssetsFromSolutionBuilderHost(instance, compilation); instance.filesWithErrors = filesWithErrors; instance.modifiedFiles = undefined; @@ -343,31 +349,51 @@ function provideDeclarationFilesToWebpack( continue; } - const outputFiles = getEmitOutput(instance, filePath); - const declarationFiles = outputFiles.filter(outputFile => - outputFile.name.match(constants.dtsDtsxOrDtsDtsxMapRegex) - ); - - declarationFiles.forEach(declarationFile => { - const assetPath = path.relative( - compilation.compiler.outputPath, - declarationFile.name + if (!isReferencedFile(instance, filePath)) { + addDeclarationFilesAsAsset( + getEmitOutput(instance, filePath), + compilation ); - compilation.assets[assetPath] = { - source: () => declarationFile.text, - size: () => declarationFile.text.length - }; - }); + } } } -function getOutputPathForBuildInfo( - compiler: typeof ts, - options: ts.CompilerOptions +function addDeclarationFilesAsAsset( + outputFiles: T[] | IterableIterator, + compilation: webpack.compilation.Compilation, + skipOutputFile?: (outputFile: T) => boolean +) { + outputFilesToAsset(outputFiles, compilation, outputFile => + skipOutputFile && skipOutputFile(outputFile) + ? true + : !outputFile.name.match(constants.dtsDtsxOrDtsDtsxMapRegex) + ); +} + +function outputFileToAsset( + outputFile: ts.OutputFile, + compilation: webpack.compilation.Compilation ) { - return (compiler as any).getTsBuildInfoEmitOutputFilePath - ? (compiler as any).getTsBuildInfoEmitOutputFilePath(options) - : (compiler as any).getOutputPathForBuildInfo(options); + const assetPath = path.relative( + compilation.compiler.outputPath, + outputFile.name + ); + compilation.assets[assetPath] = { + source: () => outputFile.text, + size: () => outputFile.text.length + }; +} + +function outputFilesToAsset( + outputFiles: T[] | IterableIterator, + compilation: webpack.compilation.Compilation, + skipOutputFile?: (outputFile: T) => boolean +) { + for (const outputFile of outputFiles) { + if (!skipOutputFile || !skipOutputFile(outputFile)) { + outputFileToAsset(outputFile, compilation); + } + } } /** @@ -377,53 +403,11 @@ function provideTsBuildInfoFilesToWebpack( instance: TSInstance, compilation: webpack.compilation.Compilation ) { - if (instance.solutionBuilderHost && instance.modifiedFiles) { - const program = ensureProgram(instance); - if (program) { - forEachResolvedProjectReference( - program.getResolvedProjectReferences(), - resolvedRef => { - if ( - resolvedRef.commandLine.fileNames.some(f => - instance.modifiedFiles!.has(path.resolve(f)) - ) - ) { - const buildInfoPath = getOutputPathForBuildInfo( - instance.compiler, - resolvedRef.commandLine.options - ); - if (buildInfoPath) { - const text = instance.compiler.sys.readFile(buildInfoPath); - if (text) { - const assetPath = path.relative( - compilation.compiler.outputPath, - path.resolve(buildInfoPath) - ); - compilation.assets[assetPath] = { - source: () => text, - size: () => text.length - }; - } - } - } - } - ); - } - } - if (instance.watchHost) { // Ensure emit is complete getEmitFromWatchHost(instance); if (instance.watchHost.tsbuildinfo) { - const { tsbuildinfo } = instance.watchHost; - const assetPath = path.relative( - compilation.compiler.outputPath, - path.resolve(tsbuildinfo.name) - ); - compilation.assets[assetPath] = { - source: () => tsbuildinfo.text, - size: () => tsbuildinfo.text.length - }; + outputFileToAsset(instance.watchHost.tsbuildinfo, compilation); } instance.watchHost.outputFiles.clear(); @@ -431,6 +415,20 @@ function provideTsBuildInfoFilesToWebpack( } } +/** + * gather all solution builder assets + */ +function provideAssetsFromSolutionBuilderHost( + instance: TSInstance, + compilation: webpack.compilation.Compilation +) { + if (instance.solutionBuilderHost) { + // written files + outputFilesToAsset(instance.solutionBuilderHost.writtenFiles, compilation); + instance.solutionBuilderHost.writtenFiles.length = 0; + } +} + /** * handle all other errors. The basic approach here to get accurate error * reporting is to start with a "blank slate" each compilation and gather diff --git a/src/index.ts b/src/index.ts index eccea8ef9..fbe75eaff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,9 +5,13 @@ import * as webpack from 'webpack'; import * as constants from './constants'; import { + buildSolutionReferences, getEmitOutput, + getInputFileNameFromOutput, getTypeScriptInstance, - isReferencedFile + initializeInstance, + isReferencedFile, + reportTranspileErrors } from './instances'; import { LoaderOptions, @@ -42,37 +46,39 @@ function loader(this: webpack.loader.LoaderContext, contents: string) { callback(new Error(instanceOrError.error.message)); return; } - - return successLoader( - this, - contents, - callback, - options, - instanceOrError.instance! - ); + const instance = instanceOrError.instance!; + buildSolutionReferences(instance, this); + successLoader(this, contents, callback, instance); } function successLoader( loaderContext: webpack.loader.LoaderContext, contents: string, callback: webpack.loader.loaderCallback, - options: LoaderOptions, instance: TSInstance ) { + initializeInstance(loaderContext, instance); + reportTranspileErrors(instance, loaderContext); const rawFilePath = path.normalize(loaderContext.resourcePath); const filePath = - options.appendTsSuffixTo.length > 0 || options.appendTsxSuffixTo.length > 0 + instance.loaderOptions.appendTsSuffixTo.length > 0 || + instance.loaderOptions.appendTsxSuffixTo.length > 0 ? appendSuffixesIfMatch( { - '.ts': options.appendTsSuffixTo, - '.tsx': options.appendTsxSuffixTo + '.ts': instance.loaderOptions.appendTsSuffixTo, + '.tsx': instance.loaderOptions.appendTsxSuffixTo }, rawFilePath ) : rawFilePath; - const fileVersion = updateFileInCache(options, filePath, contents, instance); + const fileVersion = updateFileInCache( + instance.loaderOptions, + filePath, + contents, + instance + ); const referencedProject = getAndCacheProjectReference(filePath, instance); if (referencedProject !== undefined) { const [relativeProjectConfigPath, relativeFilePath] = [ @@ -132,13 +138,12 @@ function successLoader( filePath, contents, loaderContext, - options, fileVersion, callback, instance ); } else { - const { outputText, sourceMapText } = options.transpileOnly + const { outputText, sourceMapText } = instance.loaderOptions.transpileOnly ? getTranspilationEmit(filePath, contents, instance, loaderContext) : getEmit(rawFilePath, filePath, instance, loaderContext); @@ -148,7 +153,6 @@ function successLoader( filePath, contents, loaderContext, - options, fileVersion, callback, instance @@ -162,23 +166,29 @@ function makeSourceMapAndFinish( filePath: string, contents: string, loaderContext: webpack.loader.LoaderContext, - options: LoaderOptions, fileVersion: number, callback: webpack.loader.loaderCallback, instance: TSInstance ) { if (outputText === null || outputText === undefined) { + setModuleMeta(loaderContext, instance, fileVersion); const additionalGuidance = isReferencedFile(instance, filePath) ? ' The most common cause for this is having errors when building referenced projects.' - : !options.allowTsInNodeModules && filePath.indexOf('node_modules') !== -1 + : !instance.loaderOptions.allowTsInNodeModules && + filePath.indexOf('node_modules') !== -1 ? ' By default, ts-loader will not compile .ts files in node_modules.\n' + 'You should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option.\n' + 'See: https://github.com/Microsoft/TypeScript/issues/12358' : ''; - throw new Error( - `TypeScript emitted no output for ${filePath}.${additionalGuidance}` + callback( + new Error( + `TypeScript emitted no output for ${filePath}.${additionalGuidance}` + ), + outputText, + undefined ); + return; } const { sourceMap, output } = makeSourceMap( @@ -189,15 +199,25 @@ function makeSourceMapAndFinish( loaderContext ); + setModuleMeta(loaderContext, instance, fileVersion); + callback(null, output, sourceMap); +} + +function setModuleMeta( + loaderContext: webpack.loader.LoaderContext, + instance: TSInstance, + fileVersion: number +) { // _module.meta is not available inside happypack - if (!options.happyPackMode && loaderContext._module.buildMeta !== undefined) { + if ( + !instance.loaderOptions.happyPackMode && + loaderContext._module.buildMeta !== undefined + ) { // Make sure webpack is aware that even though the emitted JavaScript may be the same as // a previously cached version the TypeScript may be different and therefore should be // treated as new loaderContext._module.buildMeta.tsLoaderFileVersion = fileVersion; } - - callback(null, output, sourceMap); } /** @@ -394,14 +414,15 @@ function updateFileInCache( // it is allowed by the options. (options.allowTsInNodeModules || filePath.indexOf('node_modules') === -1) ) { - instance.version!++; + instance.version++; instance.rootFileNames.add(filePath); } if (file.text !== contents) { file.version++; file.text = contents; - instance.version!++; + file.modifiedTime = new Date(); + instance.version++; if ( (instance.watchHost !== undefined || instance.solutionBuilderHost !== undefined) && @@ -447,54 +468,80 @@ function getEmit( loaderContext: webpack.loader.LoaderContext ) { const outputFiles = getEmitOutput(instance, filePath); + loaderContext.clearDependencies(); + loaderContext.addDependency(rawFilePath); + + const dependencies: string[] = []; + const addDependency = (file: string) => { + file = path.resolve(file); + loaderContext.addDependency(file); + dependencies.push(file); + }; + // Make this file dependent on *all* definition files in the program if (!isReferencedFile(instance, filePath)) { - loaderContext.clearDependencies(); - loaderContext.addDependency(rawFilePath); - - const allDefinitionFiles = [...instance.files.keys()].filter(defFilePath => - defFilePath.match(constants.dtsDtsxOrDtsDtsxMapRegex) - ); - - // Make this file dependent on *all* definition files in the program - const addDependency = loaderContext.addDependency.bind(loaderContext); - allDefinitionFiles.forEach(addDependency); - - // Additionally make this file dependent on all imported files - const fileDependencies = instance.dependencyGraph[filePath]; - const additionalDependencies = - fileDependencies === undefined - ? [] - : fileDependencies.map(({ resolvedFileName, originalFileName }) => { - const projectReference = getAndCacheProjectReference( - resolvedFileName, - instance - ); - // In the case of dependencies that are part of a project reference, - // the real dependency that webpack should watch is the JS output file. - return projectReference !== undefined - ? getAndCacheOutputJSFileName( - resolvedFileName, - projectReference, - instance - ) - : originalFileName; - }); - - if (additionalDependencies.length > 0) { - additionalDependencies.forEach(addDependency); + for (const defFilePath of instance.files.keys()) { + if ( + defFilePath.match(constants.dtsDtsxOrDtsDtsxMapRegex) && + // Remove the project reference d.ts as we are adding dependency for .ts later + // This removed extra build pass (resulting in new stats object in initial build) + (!instance.solutionBuilderHost || + instance.solutionBuilderHost.getOutputFileFromReferencedProject( + defFilePath + ) !== undefined) + ) { + addDependency(defFilePath); + } } + } - loaderContext._module.buildMeta.tsLoaderDefinitionFileVersions = allDefinitionFiles - .concat(additionalDependencies) - .map( - defFilePath => - defFilePath + - '@' + - (instance.files.get(defFilePath) || { version: '?' }).version + // Additionally make this file dependent on all imported files + const fileDependencies = instance.dependencyGraph[filePath]; + if (fileDependencies) { + for (const { resolvedFileName, originalFileName } of fileDependencies) { + const projectReference = getAndCacheProjectReference( + resolvedFileName, + instance ); + // In the case of dependencies that are part of a project reference, + // the real dependency that webpack should watch is the JS output file. + if (projectReference !== undefined) { + addDependency( + getAndCacheOutputJSFileName( + resolvedFileName, + projectReference, + instance + ) + ); + } else { + addDependency( + getInputFileNameFromOutput( + instance, + path.resolve(resolvedFileName) + ) || originalFileName + ); + } + } } + addDependenciesFromSolutionBuilder(instance, filePath, addDependency); + + loaderContext._module.buildMeta.tsLoaderDefinitionFileVersions = dependencies.map( + defFilePath => + defFilePath + + '@' + + ( + instance.files.get(defFilePath) || + instance.otherFiles.get(defFilePath) || { version: '?' } + ).version + ); + + return getOutputAndSourceMapFromOutputFiles(outputFiles); +} + +function getOutputAndSourceMapFromOutputFiles( + outputFiles: typescript.OutputFile[] +) { const outputFile = outputFiles .filter(file => file.name.match(constants.jsJsx)) .pop(); @@ -505,10 +552,116 @@ function getEmit( .pop(); const sourceMapText = sourceMapFile === undefined ? undefined : sourceMapFile.text; - return { outputText, sourceMapText }; } +function addDependenciesFromSolutionBuilder( + instance: TSInstance, + filePath: string, + addDependency: (file: string) => void +) { + if (!instance.solutionBuilderHost) { + return; + } + + // Add all the input files from the references as + const resolvedFilePath = path.resolve(filePath); + if (!isReferencedFile(instance, filePath)) { + if ( + instance.configParseResult.fileNames.some( + f => path.resolve(f) === resolvedFilePath + ) + ) { + addDependenciesFromProjectReferences( + instance, + path.resolve(instance.configFilePath!), + instance.configParseResult.projectReferences, + addDependency + ); + } + return; + } + + // Referenced file find the config for it + for (const [ + configFile, + configInfo + ] of instance.solutionBuilderHost.configFileInfo.entries()) { + if ( + !configInfo.config || + !configInfo.config.projectReferences || + !configInfo.config.projectReferences.length + ) { + continue; + } + if (configInfo.outputFileNames) { + if (!configInfo.outputFileNames.has(resolvedFilePath)) { + continue; + } + } else if ( + !configInfo.config.fileNames.some( + f => path.resolve(f) === resolvedFilePath + ) + ) { + continue; + } + + // Depend on all the dts files from the program + if (configInfo.dtsFiles) { + configInfo.dtsFiles.forEach(addDependency); + } + addDependenciesFromProjectReferences( + instance, + configFile, + configInfo.config.projectReferences, + addDependency + ); + break; + } +} + +function addDependenciesFromProjectReferences( + instance: TSInstance, + configFile: string, + projectReferences: readonly typescript.ProjectReference[] | undefined, + addDependency: (file: string) => void +) { + if (!projectReferences || !projectReferences.length) { + return; + } + // This is the config for the input file + const seenMap = new Map(); + seenMap.set(configFile, true); + + // Add dependencies to all the input files from the project reference files since building them + const queue = projectReferences.slice(); + while (true) { + const currentRef = queue.pop(); + if (!currentRef) { + break; + } + const refConfigFile = path.resolve( + instance.compiler.resolveProjectReferencePath(currentRef) + ); + if (seenMap.has(refConfigFile)) { + continue; + } + const refConfigInfo = instance.solutionBuilderHost!.configFileInfo.get( + refConfigFile + ); + if (!refConfigInfo) { + continue; + } + seenMap.set(refConfigFile, true); + if (refConfigInfo.config) { + refConfigInfo.config.fileNames.forEach(addDependency); + if (refConfigInfo.config.projectReferences) { + queue.push(...refConfigInfo.config.projectReferences); + } + } + } +} + /** * Transpile file */ @@ -518,6 +671,16 @@ function getTranspilationEmit( instance: TSInstance, loaderContext: webpack.loader.LoaderContext ) { + if (isReferencedFile(instance, fileName)) { + const outputFiles = instance.solutionBuilderHost!.getOutputFilesFromReferencedProjectInput( + fileName + ); + addDependenciesFromSolutionBuilder(instance, fileName, file => + loaderContext.addDependency(path.resolve(file)) + ); + return getOutputAndSourceMapFromOutputFiles(outputFiles); + } + const { outputText, sourceMapText, @@ -529,11 +692,12 @@ function getTranspilationEmit( fileName }); + addDependenciesFromSolutionBuilder(instance, fileName, file => + loaderContext.addDependency(path.resolve(file)) + ); + // _module.errors is not available inside happypack - see https://github.com/TypeStrong/ts-loader/issues/336 - if ( - !instance.loaderOptions.happyPackMode && - !isReferencedFile(instance, fileName) - ) { + if (!instance.loaderOptions.happyPackMode) { const errors = formatErrors( diagnostics, instance.loaderOptions, diff --git a/src/instances.ts b/src/instances.ts index 9d271156d..c8b99c1e5 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -7,7 +7,7 @@ import * as webpack from 'webpack'; import { makeAfterCompile } from './after-compile'; import { getCompiler, getCompilerOptions } from './compilerSetup'; import { getConfigFile, getConfigParseResult } from './config'; -import { dtsDtsxOrDtsDtsxMapRegex, EOL } from './constants'; +import { dtsDtsxOrDtsDtsxMapRegex, EOL, tsTsxRegex } from './constants'; import { LoaderOptions, TSFile, @@ -48,7 +48,9 @@ export function getTypeScriptInstance( ): { instance?: TSInstance; error?: WebpackError } { if (instances.hasOwnProperty(loaderOptions.instance)) { const instance = instances[loaderOptions.instance]; - ensureProgram(instance); + if (!instance.initialSetupPending) { + ensureProgram(instance); + } return { instance: instances[loaderOptions.instance] }; } @@ -148,39 +150,6 @@ function successfulTypeScriptInstance( ) : (filePath: string) => filePath; - // same strategy as https://github.com/s-panferov/awesome-typescript-loader/pull/531/files - let { getCustomTransformers: customerTransformers } = loaderOptions; - let getCustomTransformers = Function.prototype; - - if (typeof customerTransformers === 'function') { - getCustomTransformers = customerTransformers; - } else if (typeof customerTransformers === 'string') { - try { - customerTransformers = require(customerTransformers); - } catch (err) { - throw new Error( - `Failed to load customTransformers from "${ - loaderOptions.getCustomTransformers - }": ${err.message}` - ); - } - - if (typeof customerTransformers !== 'function') { - throw new Error( - `Custom transformers in "${ - loaderOptions.getCustomTransformers - }" should export a function, got ${typeof getCustomTransformers}` - ); - } - getCustomTransformers = customerTransformers; - } - - // if allowJs is set then we should accept js(x) files - const scriptRegex = - configParseResult.options.allowJs === true - ? /\.tsx?$|\.jsx?$/i - : /\.tsx?$/i; - if (loaderOptions.transpileOnly) { // quick return for transpiling // we do need to check for any issues with TS options though @@ -192,47 +161,19 @@ function successfulTypeScriptInstance( rootFileNames, files, otherFiles, + version: 0, program: undefined, // temporary, to be set later dependencyGraph: {}, reverseDependencyGraph: {}, transformers: {} as typescript.CustomTransformers, // this is only set temporarily, custom transformers are created further down - colors + colors, + initialSetupPending: true, + reportTranspileErrors: true, + configFilePath, + configParseResult, + log }); - tryAndBuildSolutionReferences( - transpileInstance, - loader, - log, - scriptRegex, - configFilePath - ); - const program = (transpileInstance.program = - configParseResult.projectReferences !== undefined - ? compiler!.createProgram({ - rootNames: configParseResult.fileNames, - options: configParseResult.options, - projectReferences: configParseResult.projectReferences - }) - : compiler!.createProgram([], compilerOptions)); - - // happypack does not have _module.errors - see https://github.com/TypeStrong/ts-loader/issues/336 - if (!loaderOptions.happyPackMode) { - const solutionErrors: WebpackError[] = getSolutionErrors( - transpileInstance, - loader.context - ); - const diagnostics = program.getOptionsDiagnostics(); - const errors = formatErrors( - diagnostics, - loaderOptions, - colors, - compiler!, - { file: configFilePath || 'tsconfig.json' }, - loader.context - ); - loader._module.errors.push(...solutionErrors, ...errors); - } - transpileInstance.transformers = getCustomTransformers(program); return { instance: transpileInstance }; } @@ -276,100 +217,219 @@ function successfulTypeScriptInstance( transformers: {} as typescript.CustomTransformers, // this is only set temporarily, custom transformers are created further down dependencyGraph: {}, reverseDependencyGraph: {}, - colors + colors, + initialSetupPending: true, + configFilePath, + configParseResult, + log }); - if (!loader._compiler.hooks) { - throw new Error( - "You may be using an old version of webpack; please check you're using at least version 4" - ); + return { instance }; +} + +export function initializeInstance( + loader: webpack.loader.LoaderContext, + instance: TSInstance +) { + if (!instance.initialSetupPending) { + return; } - tryAndBuildSolutionReferences( - instance, - loader, - log, - scriptRegex, - configFilePath - ); + instance.initialSetupPending = false; - if (loaderOptions.experimentalWatchApi && compiler.createWatchProgram) { - log.logInfo('Using watch api'); + // same strategy as https://github.com/s-panferov/awesome-typescript-loader/pull/531/files + let { getCustomTransformers: customerTransformers } = instance.loaderOptions; + let getCustomTransformers = Function.prototype; - // If there is api available for watch, use it instead of language service - instance.watchHost = makeWatchHost( - scriptRegex, - log, - loader, - instance, - configParseResult.projectReferences - ); - instance.watchOfFilesAndCompilerOptions = compiler.createWatchProgram( - instance.watchHost - ); - instance.builderProgram = instance.watchOfFilesAndCompilerOptions.getProgram(); - instance.program = instance.builderProgram.getProgram(); + if (typeof customerTransformers === 'function') { + getCustomTransformers = customerTransformers; + } else if (typeof customerTransformers === 'string') { + try { + customerTransformers = require(customerTransformers); + } catch (err) { + throw new Error( + `Failed to load customTransformers from "${ + instance.loaderOptions.getCustomTransformers + }": ${err.message}` + ); + } + + if (typeof customerTransformers !== 'function') { + throw new Error( + `Custom transformers in "${ + instance.loaderOptions.getCustomTransformers + }" should export a function, got ${typeof getCustomTransformers}` + ); + } + getCustomTransformers = customerTransformers; + } - instance.transformers = getCustomTransformers(instance.program); + if (instance.loaderOptions.transpileOnly) { + const program = (instance.program = + instance.configParseResult.projectReferences !== undefined + ? instance.compiler.createProgram({ + rootNames: instance.configParseResult.fileNames, + options: instance.configParseResult.options, + projectReferences: instance.configParseResult.projectReferences + }) + : instance.compiler.createProgram([], instance.compilerOptions)); + + instance.transformers = getCustomTransformers(program); + // Setup watch run for solution building + if (instance.solutionBuilderHost) { + loader._compiler.hooks.afterCompile.tapAsync( + 'ts-loader', + makeAfterCompile(instance, instance.configFilePath) + ); + loader._compiler.hooks.watchRun.tapAsync( + 'ts-loader', + makeWatchRun(instance) + ); + } } else { - const servicesHost = makeServicesHost( - scriptRegex, - log, - loader, - instance, - loaderOptions.experimentalFileCaching, - configParseResult.projectReferences - ); + if (!loader._compiler.hooks) { + throw new Error( + "You may be using an old version of webpack; please check you're using at least version 4" + ); + } - instance.languageService = compiler.createLanguageService( - servicesHost.servicesHost, - compiler.createDocumentRegistry() - ); + if ( + instance.loaderOptions.experimentalWatchApi && + instance.compiler.createWatchProgram + ) { + instance.log.logInfo('Using watch api'); - if (servicesHost.clearCache !== null) { - loader._compiler.hooks.watchRun.tap('ts-loader', servicesHost.clearCache); + // If there is api available for watch, use it instead of language service + instance.watchHost = makeWatchHost( + getScriptRegexp(instance), + loader, + instance, + instance.configParseResult.projectReferences + ); + instance.watchOfFilesAndCompilerOptions = instance.compiler.createWatchProgram( + instance.watchHost + ); + instance.builderProgram = instance.watchOfFilesAndCompilerOptions.getProgram(); + instance.program = instance.builderProgram.getProgram(); + + instance.transformers = getCustomTransformers(instance.program); + } else { + instance.servicesHost = makeServicesHost( + getScriptRegexp(instance), + loader, + instance, + instance.loaderOptions.experimentalFileCaching, + instance.configParseResult.projectReferences + ); + + instance.languageService = instance.compiler.createLanguageService( + instance.servicesHost.servicesHost, + instance.compiler.createDocumentRegistry() + ); + + if (instance.servicesHost.clearCache !== null) { + loader._compiler.hooks.watchRun.tap( + 'ts-loader', + instance.servicesHost.clearCache + ); + } + + instance.transformers = getCustomTransformers( + instance.languageService!.getProgram() + ); } - instance.transformers = getCustomTransformers( - instance.languageService!.getProgram() + loader._compiler.hooks.afterCompile.tapAsync( + 'ts-loader', + makeAfterCompile(instance, instance.configFilePath) + ); + loader._compiler.hooks.watchRun.tapAsync( + 'ts-loader', + makeWatchRun(instance) ); } +} - loader._compiler.hooks.afterCompile.tapAsync( - 'ts-loader', - makeAfterCompile(instance, configFilePath) - ); - loader._compiler.hooks.watchRun.tapAsync('ts-loader', makeWatchRun(instance)); +function getScriptRegexp(instance: TSInstance) { + // if allowJs is set then we should accept js(x) files + return instance.configParseResult.options.allowJs === true + ? /\.tsx?$|\.jsx?$/i + : /\.tsx?$/i; +} - return { instance }; +export function reportTranspileErrors( + instance: TSInstance, + loader: webpack.loader.LoaderContext +) { + if (!instance.reportTranspileErrors) { + return; + } + instance.reportTranspileErrors = false; + // happypack does not have _module.errors - see https://github.com/TypeStrong/ts-loader/issues/336 + if (!instance.loaderOptions.happyPackMode) { + const solutionErrors: WebpackError[] = getSolutionErrors( + instance, + loader.context + ); + const diagnostics = instance.program!.getOptionsDiagnostics(); + const errors = formatErrors( + diagnostics, + instance.loaderOptions, + instance.colors, + instance.compiler, + { file: instance.configFilePath || 'tsconfig.json' }, + loader.context + ); + loader._module.errors.push(...solutionErrors, ...errors); + } } -function tryAndBuildSolutionReferences( +export function buildSolutionReferences( instance: TSInstance, - loader: webpack.loader.LoaderContext, - log: logger.Logger, - scriptRegex: RegExp, - configFilePath: string | undefined + loader: webpack.loader.LoaderContext ) { - if ( - configFilePath && - supportsSolutionBuild(instance.loaderOptions, instance.compiler) - ) { + if (!supportsSolutionBuild(instance)) { + return; + } + if (!instance.solutionBuilderHost) { // Use solution builder - log.logInfo('Using SolutionBuilder api'); - instance.configFilePath = configFilePath; + instance.log.logInfo('Using SolutionBuilder api'); + const scriptRegex = getScriptRegexp(instance); instance.solutionBuilderHost = makeSolutionBuilderHost( scriptRegex, - log, loader, instance ); instance.solutionBuilder = instance.compiler.createSolutionBuilderWithWatch( instance.solutionBuilderHost, - [configFilePath], + instance.configParseResult.projectReferences!.map(ref => ref.path), { verbose: true } ); - instance.solutionBuilder.buildReferences(instance.configFilePath); + instance.solutionBuilder!.build(); + ensureAllReferences(instance); + } else { + instance.solutionBuilderHost.buildReferences(); + } +} + +function ensureAllReferences(instance: TSInstance) { + // Return result from the json without errors so that the extra errors from config are digested here + for (const configInfo of instance.solutionBuilderHost!.configFileInfo.values()) { + if (!configInfo.config) { + continue; + } + // Load all the input files + configInfo.config.fileNames.forEach(file => { + const resolvedFileName = path.resolve(file); + const existing = instance.otherFiles.get(resolvedFileName); + if (!existing) { + instance.otherFiles.set(resolvedFileName, { + version: 1, + text: instance.compiler.sys.readFile(file), + modifiedTime: instance.compiler.sys.getModifiedTime!(file) + }); + } + }); } } @@ -484,7 +544,7 @@ function getOutputJSFileName( : undefined; } -function getOutputFileNames( +export function getOutputFileNames( instance: TSInstance, configFile: typescript.ParsedCommandLine, inputFileName: string @@ -530,36 +590,35 @@ function getOutputFileNames( return outputs; } -function getOutputFilesFromReference( - program: typescript.Program, +export function getInputFileNameFromOutput( instance: TSInstance, filePath: string -): typescript.OutputFile[] | undefined { - // May be api to get file - return forEachResolvedProjectReference( - program.getResolvedProjectReferences(), - ({ commandLine }) => { - const { options, fileNames } = commandLine; - if ( - !options.outFile && - !options.out && - fileNames.some(file => path.normalize(file) === filePath) - ) { - const outputFiles: typescript.OutputFile[] = []; - getOutputFileNames( - instance, - commandLine, - (instance.compiler as any).resolvePath(filePath) - ).forEach(name => { - const text = instance.compiler.sys.readFile(name); - if (text) { - outputFiles.push({ name, text, writeByteOrderMark: false }); - } - }); - return outputFiles; +): string | undefined { + if (filePath.match(tsTsxRegex) && !fileExtensionIs(filePath, '.d.ts')) { + return undefined; + } + if (instance.solutionBuilderHost) { + return instance.solutionBuilderHost.getInputFileNameFromOutput(filePath); + } + const program = ensureProgram(instance); + return ( + program && + program.getResolvedProjectReferences && + forEachResolvedProjectReference( + program.getResolvedProjectReferences(), + ({ commandLine }) => { + const { options, fileNames } = commandLine; + if (!options.outFile && !options.out) { + const input = fileNames.find(file => + getOutputFileNames(instance, commandLine, file).find( + name => path.resolve(name) === filePath + ) + ); + return input && path.resolve(input); + } + return undefined; } - return undefined; - } + ) ); } @@ -628,19 +687,14 @@ export function getEmitOutput(instance: TSInstance, filePath: string) { if (fileExtensionIs(filePath, instance.compiler.Extension.Dts)) { return []; } + if (isReferencedFile(instance, filePath)) { + return instance.solutionBuilderHost!.getOutputFilesFromReferencedProjectInput( + filePath + ); + } const program = ensureProgram(instance); if (program !== undefined) { const sourceFile = program.getSourceFile(filePath); - if (isReferencedFile(instance, filePath)) { - const builtReferences = getOutputFilesFromReference( - program, - instance, - filePath - ); - if (builtReferences) { - return builtReferences; - } - } const outputFiles: typescript.OutputFile[] = []; const writeFile = ( fileName: string, diff --git a/src/interfaces.ts b/src/interfaces.ts index 57cb8b269..e873dedd7 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -2,6 +2,7 @@ export { ModuleResolutionHost, FormatDiagnosticsHost } from 'typescript'; import * as typescript from 'typescript'; import { Chalk } from 'chalk'; +import * as logger from './logger'; export interface ErrorInfo { code: number; @@ -37,6 +38,13 @@ export type ResolveSync = ( moduleName: string ) => string; +export type Action = () => void; + +export interface ServiceHostWhichMayBeCacheable { + servicesHost: typescript.LanguageServiceHost; + clearCache: Action | null; +} + export interface WatchHost extends typescript.WatchCompilerHostOfFilesAndCompilerOptions< typescript.EmitAndSemanticDiagnosticsBuilderProgram @@ -64,19 +72,9 @@ export interface WatchFactory { ): void; invokeDirectoryWatcher(directory: string, fileAddedOrRemoved: string): void; /** Used to watch changes in source files, missing files needed to update the program or config file */ - watchFile( - path: string, - callback: typescript.FileWatcherCallback, - pollingInterval?: number, - options?: typescript.CompilerOptions - ): typescript.FileWatcher; + watchFile: typescript.WatchHost['watchFile']; /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */ - watchDirectory( - path: string, - callback: typescript.DirectoryWatcherCallback, - recursive?: boolean, - options?: typescript.CompilerOptions - ): typescript.FileWatcher; + watchDirectory: typescript.WatchHost['watchDirectory']; } export interface SolutionDiagnostics { @@ -91,6 +89,27 @@ export interface SolutionBuilderWithWatchHost >, WatchFactory { diagnostics: SolutionDiagnostics; + writtenFiles: OutputFile[]; + configFileInfo: Map; + outputAffectingInstanceVersion: Map; + getOutputFileFromReferencedProject( + outputFileName: string + ): OutputFile | false | undefined; + getInputFileNameFromOutput(outputFileName: string): string | undefined; + getOutputFilesFromReferencedProjectInput(inputFileName: string): OutputFile[]; + buildReferences(): void; +} + +export interface ConfigFileInfo { + config: typescript.ParsedCommandLine | undefined; + outputFileNames?: Map; + tsbuildInfoFile?: string; + dtsFiles?: string[]; +} + +export interface OutputFile extends typescript.OutputFile { + time: Date; + version: number; } export interface TSInstance { @@ -114,8 +133,9 @@ export interface TSInstance { * warnings about source maps during a single compilation. */ projectsMissingSourceMaps?: Set; + servicesHost?: ServiceHostWhichMayBeCacheable; languageService?: typescript.LanguageService | null; - version?: number; + version: number; dependencyGraph: DependencyGraph; reverseDependencyGraph: ReverseDependencyGraph; filesWithErrors?: TSFiles; @@ -132,11 +152,16 @@ export interface TSInstance { hasUnaccountedModifiedFiles?: boolean; changedFilesList?: boolean; + reportTranspileErrors?: boolean; solutionBuilderHost?: SolutionBuilderWithWatchHost; solutionBuilder?: typescript.SolutionBuilder< typescript.EmitAndSemanticDiagnosticsBuilderProgram >; - configFilePath?: string; + configFilePath: string | undefined; + + initialSetupPending: boolean; + configParseResult: typescript.ParsedCommandLine; + log: logger.Logger; } export interface LoaderOptionsCache { @@ -218,6 +243,7 @@ export interface LoaderOptions { export interface TSFile { text?: string; version: number; + modifiedTime?: Date; projectReference?: { /** * Undefined here means we’ve already checked and confirmed there is no diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 5c7d96108..dd8cf44f6 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -4,13 +4,18 @@ import * as webpack from 'webpack'; import { getParsedCommandLine } from './config'; import * as constants from './constants'; +import { getOutputFileNames } from './instances'; import { + Action, + ConfigFileInfo, CustomResolveModuleName, CustomResolveTypeReferenceDirective, FormatDiagnosticsHost, ModuleResolutionHost, + OutputFile, ResolvedModule, ResolveSync, + ServiceHostWhichMayBeCacheable, SolutionBuilderWithWatchHost, SolutionDiagnostics, TSFile, @@ -20,15 +25,26 @@ import { WatchHost, WebpackError } from './interfaces'; -import * as logger from './logger'; import { makeResolver } from './resolver'; import { formatErrors, readFile, unorderedRemoveItem } from './utils'; -export type Action = () => void; - -export interface ServiceHostWhichMayBeCacheable { - servicesHost: typescript.LanguageServiceHost; - clearCache: Action | null; +function readFileWithInstance( + instance: TSInstance, + filePath: string, + encoding?: string | undefined +): string | undefined { + if (instance.solutionBuilderHost) { + const outputFile = instance.solutionBuilderHost.getOutputFileFromReferencedProject( + filePath + ); + if (outputFile !== undefined) { + return outputFile ? outputFile.text : undefined; + } + } + return ( + instance.compiler.sys.readFile(filePath, encoding) || + readFile(filePath, encoding) + ); } /** @@ -36,7 +52,6 @@ export interface ServiceHostWhichMayBeCacheable { */ export function makeServicesHost( scriptRegex: RegExp, - log: logger.Logger, loader: webpack.loader.LoaderContext, instance: TSInstance, enableFileCaching: boolean, @@ -66,12 +81,22 @@ export function makeServicesHost( const readFileWithFallback = ( filePath: string, encoding?: string | undefined - ): string | undefined => - compiler.sys.readFile(filePath, encoding) || readFile(filePath, encoding); + ): string | undefined => readFileWithInstance(instance, filePath, encoding); - const fileExists = (filePathToCheck: string) => - compiler.sys.fileExists(filePathToCheck) || - readFile(filePathToCheck) !== undefined; + const fileExists = (filePathToCheck: string) => { + if (instance.solutionBuilderHost) { + const outputFile = instance.solutionBuilderHost.getOutputFileFromReferencedProject( + filePathToCheck + ); + if (outputFile !== undefined) { + return !!outputFile; + } + } + return ( + compiler.sys.fileExists(filePathToCheck) || + readFile(filePathToCheck) !== undefined + ); + }; let clearCache: Action | null = null; let moduleResolutionHost: ModuleResolutionHost = { @@ -115,7 +140,21 @@ export function makeServicesHost( getScriptVersion: (fileName: string) => { fileName = path.normalize(fileName); const file = files.get(fileName); - return file === undefined ? '' : file.version.toString(); + if (file) { + return file.version.toString(); + } + const outputFile = + instance.solutionBuilderHost && + instance.solutionBuilderHost.getOutputFileFromReferencedProject( + fileName + ); + if (outputFile !== undefined) { + instance.solutionBuilderHost!.outputAffectingInstanceVersion.set( + path.resolve(fileName), + true + ); + } + return outputFile ? outputFile.version.toString() : ''; }, getScriptSnapshot: (fileName: string) => { @@ -125,6 +164,21 @@ export function makeServicesHost( let file = files.get(fileName); if (file === undefined) { + if (instance.solutionBuilderHost) { + const outputFile = instance.solutionBuilderHost.getOutputFileFromReferencedProject( + fileName + ); + if (outputFile !== undefined) { + instance.solutionBuilderHost!.outputAffectingInstanceVersion.set( + path.resolve(fileName), + true + ); + return outputFile + ? compiler.ScriptSnapshot.fromString(outputFile.text) + : undefined; + } + } + const text = readFile(fileName); if (text === undefined) { return undefined; @@ -163,8 +217,8 @@ export function makeServicesHost( getDefaultLibFileName: (options: typescript.CompilerOptions) => compiler.getDefaultLibFilePath(options), getNewLine: () => newLine, - trace: log.log, - log: log.log, + trace: instance.log.log, + log: instance.log.log, // used for (/// ) see https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250#issuecomment-485061329 resolveTypeReferenceDirectives: resolvers.resolveTypeReferenceDirectives, @@ -244,12 +298,7 @@ function makeResolvers( }; } -function createWatchFactory( - beforeCallbacks?: ( - key: string, - cb: typescript.FileWatcherCallback[] | typescript.DirectoryWatcherCallback[] - ) => void -): WatchFactory { +function createWatchFactory(): WatchFactory { const watchedFiles: WatchCallbacks< typescript.FileWatcherCallback > = new Map(); @@ -283,9 +332,6 @@ function createWatchFactory( // The array copy is made to ensure that even if one of the callback removes the callbacks, // we dont miss any callbacks following it const cbs = callbacks.slice(); - if (beforeCallbacks) { - beforeCallbacks(key, cbs); - } for (const cb of cbs) { cb(fileName, eventKind as typescript.FileWatcherEventKind); } @@ -385,7 +431,8 @@ export function updateFileWithText( if (newText !== file.text) { file.text = newText; file.version++; - instance.version!++; + file.modifiedTime = new Date(); + instance.version++; if (!instance.modifiedFiles) { instance.modifiedFiles = new Map(); } @@ -411,7 +458,6 @@ export function updateFileWithText( */ export function makeWatchHost( scriptRegex: RegExp, - log: logger.Logger, loader: webpack.loader.LoaderContext, instance: TSInstance, projectReferences?: ReadonlyArray @@ -441,8 +487,7 @@ export function makeWatchHost( const readFileWithFallback = ( filePath: string, encoding?: string | undefined - ): string | undefined => - compiler.sys.readFile(filePath, encoding) || readFile(filePath, encoding); + ): string | undefined => readFileWithInstance(instance, filePath, encoding); const moduleResolutionHost: ModuleResolutionHost = { fileExists, @@ -495,7 +540,7 @@ export function makeWatchHost( depth ), realpath: dirPath => compiler.sys.resolvePath(path.normalize(dirPath)), - trace: logData => log.log(logData), + trace: logData => instance.log.log(logData), watchFile, watchDirectory, @@ -575,12 +620,15 @@ export function makeWatchHost( } } +function normalizeSlashes(file: string): string { + return file.replace(/\\/g, '/'); +} + /** * Create the TypeScript Watch host */ export function makeSolutionBuilderHost( scriptRegex: RegExp, - log: logger.Logger, loader: webpack.loader.LoaderContext, instance: TSInstance ): SolutionBuilderWithWatchHost { @@ -631,22 +679,28 @@ export function makeSolutionBuilderHost( } else { diagnostics.global.push(d); } - log.logInfo(compiler.formatDiagnostic(d, formatDiagnosticHost)); + instance.log.logInfo(compiler.formatDiagnostic(d, formatDiagnosticHost)); }; const reportSolutionBuilderStatus = (d: typescript.Diagnostic) => - log.logInfo(compiler.formatDiagnostic(d, formatDiagnosticHost)); + instance.log.logInfo(compiler.formatDiagnostic(d, formatDiagnosticHost)); const reportWatchStatus = ( d: typescript.Diagnostic, newLine: string, _options: typescript.CompilerOptions ) => - log.logInfo( + instance.log.logInfo( `${compiler.flattenDiagnosticMessageText( d.messageText, compiler.sys.newLine )}${newLine + newLine}` ); + const outputFiles = new Map(); + const writtenFiles: OutputFile[] = []; + const outputAffectingInstanceVersion = new Map(); + let timeoutId: [(...args: any[]) => void, any[]] | undefined; + + const configFileInfo = new Map(); const solutionBuilderHost: SolutionBuilderWithWatchHost = { ...compiler.createSolutionBuilderWithWatchHost( compiler.sys, @@ -656,19 +710,118 @@ export function makeSolutionBuilderHost( reportWatchStatus ), diagnostics, - ...createWatchFactory(beforeWatchCallbacks), + ...createWatchFactory(), // Overrides getCurrentDirectory, + // behave as if there is no tsbuild info on disk since we want to generate all outputs in memory and only use those + readFile: (fileName, encoding) => { + const outputFile = ensureOutputFile(fileName); + return outputFile !== undefined + ? outputFile + ? outputFile.text + : undefined + : readInputFile(fileName, encoding).text; + }, writeFile: (name, text, writeByteOrderMark) => { - compiler.sys.writeFile(name, text, writeByteOrderMark); updateFileWithText(instance, name, () => text); + const resolvedFileName = path.resolve(name); + const existing = outputFiles.get(resolvedFileName); + const newOutputFile: OutputFile = { + name, + text, + writeByteOrderMark: !!writeByteOrderMark, + time: new Date(), + version: existing + ? existing.text !== text + ? existing.version + 1 + : existing.version + : 0 + }; + outputFiles.set(resolvedFileName, newOutputFile); + writtenFiles.push(newOutputFile); + if ( + outputAffectingInstanceVersion.has(resolvedFileName) && + (!existing || existing.text !== text) + ) { + instance.version++; + } + }, + getModifiedTime: fileName => { + const outputFile = ensureOutputFile(fileName); + if (outputFile !== undefined) { + return outputFile ? outputFile.time : undefined; + } + const existing = + instance.files.get(path.resolve(fileName)) || + instance.otherFiles.get(path.resolve(fileName)); + return existing + ? existing.modifiedTime + : compiler.sys.getModifiedTime!(fileName); + }, + setModifiedTime: (fileName, time) => { + const outputFile = ensureOutputFile(fileName); + if (outputFile !== undefined) { + if (outputFile) { + outputFile.time = time; + } + } + compiler.sys.setModifiedTime!(fileName, time); + const existing = + instance.files.get(path.resolve(fileName)) || + instance.otherFiles.get(path.resolve(fileName)); + if (existing) { + existing.modifiedTime = time; + } + }, + fileExists: fileName => { + const outputFile = ensureOutputFile(fileName); + if (outputFile !== undefined) { + return !!outputFile; + } + const existing = + instance.files.get(path.resolve(fileName)) || + instance.otherFiles.get(path.resolve(fileName)); + return existing + ? existing.text !== undefined + : compiler.sys.fileExists(fileName); }, - setTimeout: undefined, - clearTimeout: undefined + directoryExists: directory => { + if (compiler.sys.directoryExists(directory)) { + return true; + } + const resolvedDirectory = normalizeSlashes(path.resolve(directory)) + '/'; + for (const outputFile of outputFiles.keys()) { + if (normalizeSlashes(outputFile).startsWith(resolvedDirectory)) { + return true; + } + } + return false; + }, + afterProgramEmitAndDiagnostics: transpileOnly ? undefined : storeDtsFiles, + setTimeout: (callback, _time, ...args) => { + timeoutId = [callback, args]; + return timeoutId; + }, + clearTimeout: _timeoutId => { + timeoutId = undefined; + }, + writtenFiles, + configFileInfo, + outputAffectingInstanceVersion, + getOutputFileFromReferencedProject, + getInputFileNameFromOutput: fileName => { + const result = getInputFileNameFromOutput(fileName); + return typeof result === 'string' ? result : undefined; + }, + getOutputFilesFromReferencedProjectInput, + buildReferences + }; + solutionBuilderHost.trace = logData => instance.log.logInfo(logData); + solutionBuilderHost.getParsedCommandLine = file => { + const config = getParsedCommandLine(compiler, instance.loaderOptions, file); + configFileInfo.set(path.resolve(file), { config }); + return config; }; - solutionBuilderHost.trace = logData => log.logInfo(logData); - solutionBuilderHost.getParsedCommandLine = file => - getParsedCommandLine(compiler, instance.loaderOptions, file); // make a (sync) resolver that follows webpack's rules const resolveSync = makeResolver(loader._compiler.options); @@ -690,10 +843,157 @@ export function makeSolutionBuilderHost( return solutionBuilderHost; - function beforeWatchCallbacks() { + function buildReferences() { + if (!timeoutId) { + return; + } diagnostics.global.length = 0; diagnostics.perFile.clear(); diagnostics.transpileErrors.length = 0; + + while (timeoutId) { + const [callback, args] = timeoutId; + timeoutId = undefined; + callback(...args); + } + } + + function storeDtsFiles( + builderProgram: typescript.EmitAndSemanticDiagnosticsBuilderProgram + ) { + const program = builderProgram.getProgram(); + for (const configInfo of configFileInfo.values()) { + if ( + !configInfo.config || + program.getRootFileNames() !== configInfo.config.fileNames || + program.getCompilerOptions() !== configInfo.config.options || + program.getProjectReferences() !== configInfo.config.projectReferences + ) { + continue; + } + configInfo.dtsFiles = program + .getSourceFiles() + .map(file => path.resolve(file.fileName)) + .filter(fileName => fileName.match(constants.dtsDtsxOrDtsDtsxMapRegex)); + return; + } + } + + function getInputFileNameFromOutput( + outputFileName: string + ): string | true | undefined { + const resolvedFileName = path.resolve(outputFileName); + for (const configInfo of configFileInfo.values()) { + ensureInputOutputInfo(configInfo); + if (configInfo.outputFileNames) { + for (const [ + inputFileName, + outputFilesOfInput + ] of configInfo.outputFileNames.entries()) { + if (outputFilesOfInput.indexOf(resolvedFileName) !== -1) { + return inputFileName; + } + } + } + if ( + configInfo.tsbuildInfoFile && + path.resolve(configInfo.tsbuildInfoFile) === resolvedFileName + ) { + return true; + } + } + return undefined; + } + + function ensureInputOutputInfo(configInfo: ConfigFileInfo) { + if (configInfo.outputFileNames || !configInfo.config) { + return; + } + configInfo.outputFileNames = new Map(); + configInfo.config.fileNames.forEach(inputFile => + configInfo.outputFileNames!.set( + path.resolve(inputFile), + getOutputFileNames(instance, configInfo.config!, inputFile).map( + output => path.resolve(output) + ) + ) + ); + + configInfo.tsbuildInfoFile = instance.compiler + .getTsBuildInfoEmitOutputFilePath + ? instance.compiler.getTsBuildInfoEmitOutputFilePath( + configInfo.config.options + ) + : // before api + (instance.compiler as any).getOutputPathForBuildInfo( + configInfo.config.options + ); + } + + function getOutputFileFromReferencedProject( + outputFileName: string + ): OutputFile | false | undefined { + const resolvedFileName = path.resolve(outputFileName); + return outputFiles.get(resolvedFileName); + } + + function ensureOutputFile( + outputFileName: string, + encoding?: string + ): OutputFile | false | undefined { + const outputFile = getOutputFileFromReferencedProject(outputFileName); + if (outputFile !== undefined) { + return outputFile; + } + if (!getInputFileNameFromOutput(outputFileName)) { + return undefined; + } + const resolvedFileName = path.resolve(outputFileName); + const text = compiler.sys.readFile(outputFileName, encoding); + if (text === undefined) { + outputFiles.set(resolvedFileName, false); + return false; + } + const newOutputFile: OutputFile = { + name: outputFileName, + text, + writeByteOrderMark: false, + time: compiler.sys.getModifiedTime!(outputFileName)!, + version: 0 + }; + outputFiles.set(resolvedFileName, newOutputFile); + return newOutputFile; + } + + function getOutputFilesFromReferencedProjectInput(inputFileName: string) { + const resolvedFileName = path.resolve(inputFileName); + for (const configInfo of configFileInfo.values()) { + ensureInputOutputInfo(configInfo); + if (configInfo.outputFileNames) { + const result = configInfo.outputFileNames.get(resolvedFileName); + if (result) { + return result + .map(outputFile => outputFiles.get(outputFile)!) + .filter(output => !!output) as OutputFile[]; + } + } + } + return []; + } + + function readInputFile(inputFileName: string, encoding: string | undefined) { + const resolvedFileName = path.resolve(inputFileName); + const existing = instance.otherFiles.get(resolvedFileName); + if (existing) { + return existing; + } + const tsFile: TSFile = { + version: 1, + text: compiler.sys.readFile(inputFileName, encoding), + modifiedTime: compiler.sys.getModifiedTime!(inputFileName) + }; + instance.otherFiles.set(resolvedFileName, tsFile); + return tsFile; } } diff --git a/src/utils.ts b/src/utils.ts index d64c119e8..46585ebe0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -235,9 +235,6 @@ export function arrify(val: T | T[]) { } export function ensureProgram(instance: TSInstance) { - if (instance.solutionBuilder) { - instance.solutionBuilder.buildReferences(instance.configFilePath!); - } if (instance && instance.watchHost) { if (instance.hasUnaccountedModifiedFiles) { if (instance.changedFilesList) { @@ -358,11 +355,14 @@ export function validateSourceMapOncePerProject( } } -export function supportsSolutionBuild( - loaderOptions: LoaderOptions, - compiler: typeof typescript -) { - return !!loaderOptions.projectReferences && !!compiler.InvalidatedProjectKind; +export function supportsSolutionBuild(instance: TSInstance) { + return ( + !!instance.configFilePath && + !!instance.loaderOptions.projectReferences && + !!instance.compiler.InvalidatedProjectKind && + !!instance.configParseResult.projectReferences && + !!instance.configParseResult.projectReferences.length + ); } /** diff --git a/src/watch-run.ts b/src/watch-run.ts index 737070f62..5a9df90d6 100644 --- a/src/watch-run.ts +++ b/src/watch-run.ts @@ -15,26 +15,30 @@ export function makeWatchRun(instance: TSInstance) { return (compiler: webpack.Compiler, callback: () => void) => { const times = compiler.fileTimestamps; - for (const [filePath, date] of times) { - if ( - date > (lastTimes.get(filePath) || startTime) && - filePath.match(constants.tsTsxJsJsxRegex) !== null - ) { - continue; + if (instance.loaderOptions.transpileOnly) { + instance.reportTranspileErrors = true; + } else { + for (const [filePath, date] of times) { + if ( + date > (lastTimes.get(filePath) || startTime) && + filePath.match(constants.tsTsxJsJsxRegex) !== null + ) { + continue; + } + + lastTimes.set(filePath, date); + updateFile(instance, filePath); } - lastTimes.set(filePath, date); - updateFile(instance, filePath); - } - - // On watch update add all known dts files expect the ones in node_modules - // (skip @types/* and modules with typings) - for (const filePath of instance.files.keys()) { - if ( - filePath.match(constants.dtsDtsxOrDtsDtsxMapRegex) !== null && - filePath.match(constants.nodeModules) === null - ) { - updateFile(instance, filePath); + // On watch update add all known dts files expect the ones in node_modules + // (skip @types/* and modules with typings) + for (const filePath of instance.files.keys()) { + if ( + filePath.match(constants.dtsDtsxOrDtsDtsxMapRegex) !== null && + filePath.match(constants.nodeModules) === null + ) { + updateFile(instance, filePath); + } } } diff --git a/test/comparison-tests/allowJs-ts-check/expectedOutput-3.8/output.txt b/test/comparison-tests/allowJs-ts-check/expectedOutput-3.8/output.txt index d23aa7e61..fe76bf89e 100644 --- a/test/comparison-tests/allowJs-ts-check/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/allowJs-ts-check/expectedOutput-3.8/output.txt @@ -7,5 +7,5 @@ Entrypoint main = bundle.js ERROR in src\error2.js ./src/error2.js -[tsl] ERROR in src\error2.js(4,10) +[tsl] ERROR in src\error2.js(4,10)  TS2339: Property 'bar' does not exist on type 'Class2'. \ No newline at end of file diff --git a/test/comparison-tests/create-and-execute-test.js b/test/comparison-tests/create-and-execute-test.js index 0a7d37a6b..09839de3d 100644 --- a/test/comparison-tests/create-and-execute-test.js +++ b/test/comparison-tests/create-and-execute-test.js @@ -13,6 +13,7 @@ const glob = require('glob'); const pathExists = require('../pathExists'); const aliasLoader = require('../aliasLoader'); const copySync = require('./copySync'); +const getProgram = require('./getProgram'); const saveOutputMode = process.argv.indexOf('--save-output') !== -1; @@ -99,12 +100,9 @@ function createTest(test, testPath, options) { } } copySync(testPath, paths.testStagingPath); - if (test.startsWith("projectReferencesWatchRefWithTwoFilesAlreadyBuilt")) { - // Copy output - copySync(path.resolve(paths.testStagingPath, "libOutput"), path.resolve(paths.testStagingPath, "lib")); - // Change the buildinfo to use typescript version we have - const buildInfoPath = path.resolve(paths.testStagingPath, "lib/tsconfig.tsbuildinfo"); - fs.writeFileSync(buildInfoPath, fs.readFileSync(buildInfoPath, "utf8").replace("FakeTSVersion", typescript.version)); + if (test.indexOf("AlreadyBuilt") !== -1) { + const program = getProgram(path.resolve(paths.testStagingPath, "lib/tsconfig.json")); + program.emit(); } // ensure output directories @@ -245,7 +243,14 @@ function storeStats(stats, testState, paths) { function compareFiles(paths, test, patch) { if (saveOutputMode) { - copySync(paths.actualOutput, paths.originalExpectedOutput); + const actualFiles = glob.sync('**/*', { cwd: paths.actualOutput, nodir: true }); + actualFiles.forEach(function (file) { + const actual = getNormalisedFileContent(file, paths.actualOutput); + const expected = getNormalisedFileContent(file, paths.expectedOutput); + if (actual !== expected) { + fs.copyFileSync(path.join(paths.actualOutput, file), path.join(paths.originalExpectedOutput, file)); + } + }); } else { // compare actual to expected diff --git a/test/comparison-tests/getProgram.js b/test/comparison-tests/getProgram.js new file mode 100644 index 000000000..4146cd7de --- /dev/null +++ b/test/comparison-tests/getProgram.js @@ -0,0 +1,12 @@ +const typescript = require('typescript'); +module.exports = function getProgram(tsconfigPath) { + const parsedCommandLine = typescript.getParsedCommandLineOfConfigFile(tsconfigPath, {}, { + fileExists: typescript.sys.fileExists, + getCurrentDirectory: typescript.sys.getCurrentDirectory, + onUnRecoverableConfigFileDiagnostic: function () { throw new Error("Error building project") }, + readFile: typescript.sys.readFile, + readDirectory: typescript.sys.readDirectory, + useCaseSensitiveFileNames: typescript.sys.useCaseSensitiveFileNames, + }); + return typescript.createProgram({ rootNames: parsedCommandLine.fileNames, options: parsedCommandLine.options }); +}; \ No newline at end of file diff --git a/test/comparison-tests/projectReferences/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferences/expectedOutput-3.8/output.txt index d3e7545db..6a42c7a13 100644 --- a/test/comparison-tests/projectReferences/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferences/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferences/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferences/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferences/tsconfig.json b/test/comparison-tests/projectReferences/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferences/tsconfig.json +++ b/test/comparison-tests/projectReferences/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesMultiple/app.ts b/test/comparison-tests/projectReferencesMultiple/app.ts new file mode 100644 index 000000000..0bce1f52e --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/app.ts @@ -0,0 +1,5 @@ +import { lib } from './lib'; +import { utils } from "./utils"; + +console.log(lib.one, lib.two, lib.three); +utils(); diff --git a/test/comparison-tests/projectReferencesMultiple/common/index.ts b/test/comparison-tests/projectReferencesMultiple/common/index.ts new file mode 100644 index 000000000..cee4c5145 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/common/index.ts @@ -0,0 +1,3 @@ +export function common() { + return 30; +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/common/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/common/tsconfig.json new file mode 100644 index 000000000..7f8ad846d --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/common/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "composite": true, + } +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/bundle.js new file mode 100644 index 000000000..8c836ba39 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/bundle.js @@ -0,0 +1,123 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! 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//projectReferencesMultiple//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! 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//projectReferencesMultiple//utils//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/output.txt new file mode 100644 index 000000000..b4b54ccfe --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/output.txt @@ -0,0 +1,39 @@ + Asset Size Chunks Chunk Names + bundle.js 5.52 KiB main [emitted] main + ../common/index.js 109 bytes [emitted] + ../common/index.d.ts 43 bytes [emitted] + ../common/tsconfig.tsbuildinfo 67.4 KiB [emitted] + ../unreferencedIndirect/index.js 176 bytes [emitted] + ../unreferencedIndirect/index.d.ts 57 bytes [emitted] +../unreferencedIndirect/tsconfig.tsbuildinfo 67.4 KiB [emitted] + ../unreferenced/index.js 144 bytes [emitted] + ../unreferenced/index.d.ts 49 bytes [emitted] + ../unreferenced/tsconfig.tsbuildinfo 67.4 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./lib/index.ts] 483 bytes {main} [built] [failed] [1 error] +[./utils/index.ts] 485 bytes {main} [built] [failed] [1 error] + +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 + +ERROR in ./utils/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for utils\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 4:14-32 + +ERROR in lib\fileWithError.ts +[tsl] ERROR in lib\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. + +ERROR in indirectWithError\fileWithError.ts +[tsl] ERROR in indirectWithError\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/bundle.js new file mode 100644 index 000000000..3680c1295 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/bundle.js @@ -0,0 +1,124 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! 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//projectReferencesMultiple//utils//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/output.txt new file mode 100644 index 000000000..9ef535ec6 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch0/output.txt @@ -0,0 +1,23 @@ + Asset Size Chunks Chunk Names + bundle.js 5.14 KiB main [emitted] main + ../lib/fileWithError.js 111 bytes [emitted] + ../lib/fileWithError.d.ts 40 bytes [emitted] + ../lib/index.js 104 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./lib/index.ts] 104 bytes {main} [built] +[./utils/index.ts] 485 bytes {main} [built] [failed] [1 error] + +ERROR in ./utils/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for utils\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 4:14-32 + +ERROR in indirectWithError\fileWithError.ts +[tsl] ERROR in indirectWithError\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/bundle.js new file mode 100644 index 000000000..3141fcd5f --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/output.txt new file mode 100644 index 000000000..440ad1d8b --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch1/output.txt @@ -0,0 +1,15 @@ + Asset Size Chunks Chunk Names + bundle.js 5.24 KiB main [emitted] main + ../indirectWithError/fileWithError.js 124 bytes [emitted] + ../indirectWithError/fileWithError.d.ts 40 bytes [emitted] + ../indirectWithError/index.js 104 bytes [emitted] + ../indirectWithError/index.d.ts 89 bytes [emitted] +../indirectWithError/tsconfig.tsbuildinfo 67.8 KiB [emitted] + ../utils/index.js 152 bytes [emitted] + ../utils/index.d.ts 40 bytes [emitted] + ../utils/tsconfig.tsbuildinfo 68 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./common/index.ts] 109 bytes {main} [built] +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/bundle.js new file mode 100644 index 000000000..3141fcd5f --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/output.txt new file mode 100644 index 000000000..6c8495da3 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch2/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names + bundle.js 5.24 KiB main [emitted] main + ../unreferenced/index.js 158 bytes [emitted] + ../unreferenced/index.d.ts 49 bytes [emitted] +../unreferenced/tsconfig.tsbuildinfo 67.4 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./common/index.ts] 109 bytes {main} +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/bundle.js new file mode 100644 index 000000000..3141fcd5f --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/output.txt new file mode 100644 index 000000000..346fffd8c --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch3/output.txt @@ -0,0 +1,11 @@ + Asset Size Chunks Chunk Names +bundle.js 5.24 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./common/index.ts] 109 bytes {main} +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} + +ERROR in unreferencedIndirect\index.ts +[tsl] ERROR in unreferencedIndirect\index.ts(2,3) + TS2322: Type '"i am unreferencedIndirect now is error"' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/bundle.js new file mode 100644 index 000000000..3141fcd5f --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/output.txt new file mode 100644 index 000000000..f272ead54 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch4/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names + bundle.js 5.24 KiB main [emitted] main + ../unreferencedIndirect/index.js 192 bytes [emitted] + ../unreferencedIndirect/index.d.ts 57 bytes [emitted] +../unreferencedIndirect/tsconfig.tsbuildinfo 67.4 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./common/index.ts] 109 bytes {main} +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/bundle.js new file mode 100644 index 000000000..3141fcd5f --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/output.txt new file mode 100644 index 000000000..142ed9fd4 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-3.8/patch5/output.txt @@ -0,0 +1,11 @@ + Asset Size Chunks Chunk Names +bundle.js 5.24 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 182 bytes {main} [built] +[./common/index.ts] 109 bytes {main} +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} + +ERROR in unreferenced\index.ts +[tsl] ERROR in unreferenced\index.ts(2,3) + TS2322: Type '"i am unreferenced with error"' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/bundle.js new file mode 100644 index 000000000..f12df4940 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/bundle.js @@ -0,0 +1,123 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! 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//projectReferencesMultiple.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! 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//projectReferencesMultiple.transpile//utils//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/output.txt new file mode 100644 index 000000000..af67a7143 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/output.txt @@ -0,0 +1,37 @@ + Asset Size Chunks Chunk Names + bundle.js 5.57 KiB main [emitted] main + ../common/index.js 109 bytes [emitted] + ../common/index.d.ts 43 bytes [emitted] + ../common/tsconfig.tsbuildinfo 67.4 KiB [emitted] + ../unreferencedIndirect/index.js 176 bytes [emitted] + ../unreferencedIndirect/index.d.ts 57 bytes [emitted] +../unreferencedIndirect/tsconfig.tsbuildinfo 67.4 KiB [emitted] + ../unreferenced/index.js 144 bytes [emitted] + ../unreferenced/index.d.ts 49 bytes [emitted] + ../unreferenced/tsconfig.tsbuildinfo 67.4 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] [2 errors] +[./lib/index.ts] 493 bytes {main} [built] [failed] [1 error] +[./utils/index.ts] 495 bytes {main} [built] [failed] [1 error] + +ERROR in [tsl] ERROR in indirectWithError\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. + +ERROR in [tsl] ERROR in lib\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. + +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 + +ERROR in ./utils/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for utils\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 4:14-32 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/bundle.js new file mode 100644 index 000000000..c97f16047 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/bundle.js @@ -0,0 +1,124 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! 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//projectReferencesMultiple.transpile//utils//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/output.txt new file mode 100644 index 000000000..e32625f22 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch0/output.txt @@ -0,0 +1,22 @@ + Asset Size Chunks Chunk Names + bundle.js 5.19 KiB main [emitted] main + ../lib/fileWithError.js 111 bytes [emitted] + ../lib/fileWithError.d.ts 40 bytes [emitted] + ../lib/index.js 104 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] [1 error] +[./lib/index.ts] 104 bytes {main} [built] +[./utils/index.ts] 495 bytes {main} [built] [failed] [1 error] + +ERROR in [tsl] ERROR in indirectWithError\fileWithError.ts(2,5) + TS2322: Type 'false' is not assignable to type 'string'. + +ERROR in ./utils/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for utils\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 4:14-32 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/bundle.js new file mode 100644 index 000000000..6cf43eb7b --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/bundle.js @@ -0,0 +1,137 @@ +/******/ (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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/index.ts\");\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./utils/index.ts\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\nutils_1.utils();\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./common/index.ts": +/*!*************************!*\ + !*** ./common/index.ts ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nfunction common() {\r\n return 30;\r\n}\r\nexports.common = common;\r\n\n\n//# sourceURL=webpack:///./common/index.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }), + +/***/ "./utils/index.ts": +/*!************************!*\ + !*** ./utils/index.ts ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./common/index.ts\");\r\nfunction utils() {\r\n common_1.common();\r\n}\r\nexports.utils = utils;\r\n\n\n//# sourceURL=webpack:///./utils/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/output.txt new file mode 100644 index 000000000..0ace3acc5 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch1/output.txt @@ -0,0 +1,15 @@ + Asset Size Chunks Chunk Names + bundle.js 5.27 KiB main [emitted] main + ../indirectWithError/fileWithError.js 124 bytes [emitted] + ../indirectWithError/fileWithError.d.ts 40 bytes [emitted] + ../indirectWithError/index.js 104 bytes [emitted] + ../indirectWithError/index.d.ts 89 bytes [emitted] +../indirectWithError/tsconfig.tsbuildinfo 67.8 KiB [emitted] + ../utils/index.js 152 bytes [emitted] + ../utils/index.d.ts 40 bytes [emitted] + ../utils/tsconfig.tsbuildinfo 68 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] +[./common/index.ts] 109 bytes {main} [built] +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch3/output.txt new file mode 100644 index 000000000..449b2a89a --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch3/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names +bundle.js 5.35 KiB main main +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] [1 error] +[./common/index.ts] 139 bytes {main} +[./lib/index.ts] 133 bytes {main} +[./utils/index.ts] 181 bytes {main} + +ERROR in [tsl] ERROR in unreferencedIndirect\index.ts(2,3) + TS2322: Type '"i am unreferencedIndirect now is error"' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch4/output.txt new file mode 100644 index 000000000..ec43f9ef3 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch4/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names + bundle.js 5.27 KiB main main + ../unreferencedIndirect/index.js 192 bytes [emitted] + ../unreferencedIndirect/index.d.ts 57 bytes [emitted] +../unreferencedIndirect/tsconfig.tsbuildinfo 67.4 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] +[./common/index.ts] 109 bytes {main} +[./lib/index.ts] 104 bytes {main} +[./utils/index.ts] 152 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch5/output.txt new file mode 100644 index 000000000..783ffc726 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/expectedOutput-transpile-3.8/patch5/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names +bundle.js 5.35 KiB main main +Entrypoint main = bundle.js +[./app.ts] 218 bytes {main} [built] [1 error] +[./common/index.ts] 139 bytes {main} +[./lib/index.ts] 133 bytes {main} +[./utils/index.ts] 181 bytes {main} + +ERROR in [tsl] ERROR in unreferenced\index.ts(2,3) + TS2322: Type '"i am unreferenced with error"' is not assignable to type 'number'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/indirectWithError/fileWithError.ts b/test/comparison-tests/projectReferencesMultiple/indirectWithError/fileWithError.ts new file mode 100644 index 000000000..0df3311ab --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/indirectWithError/fileWithError.ts @@ -0,0 +1,3 @@ +export function foo(): string { + return false; +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/indirectWithError/index.ts b/test/comparison-tests/projectReferencesMultiple/indirectWithError/index.ts new file mode 100644 index 000000000..669ca7b3d --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/indirectWithError/index.ts @@ -0,0 +1,5 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; diff --git a/test/comparison-tests/projectReferencesMultiple/indirectWithError/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/indirectWithError/tsconfig.json new file mode 100644 index 000000000..b3df08516 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/indirectWithError/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "composite": true + } +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/lib/fileWithError.ts b/test/comparison-tests/projectReferencesMultiple/lib/fileWithError.ts new file mode 100644 index 000000000..0df3311ab --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/lib/fileWithError.ts @@ -0,0 +1,3 @@ +export function foo(): string { + return false; +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/lib/index.ts b/test/comparison-tests/projectReferencesMultiple/lib/index.ts new file mode 100644 index 000000000..669ca7b3d --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/lib/index.ts @@ -0,0 +1,5 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; diff --git a/test/comparison-tests/projectReferencesMultiple/lib/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/lib/tsconfig.json new file mode 100644 index 000000000..b3df08516 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/lib/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "composite": true + } +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/patch0/lib/fileWithError.ts b/test/comparison-tests/projectReferencesMultiple/patch0/lib/fileWithError.ts new file mode 100644 index 000000000..9c7ffaa4a --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch0/lib/fileWithError.ts @@ -0,0 +1,3 @@ +export function foo(): string { + return "hello world"; +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/patch1/indirectWithError/fileWithError.ts b/test/comparison-tests/projectReferencesMultiple/patch1/indirectWithError/fileWithError.ts new file mode 100644 index 000000000..950dc3761 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch1/indirectWithError/fileWithError.ts @@ -0,0 +1,3 @@ +export function foo(): string { + return "hello i fixed this error"; +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/patch2/unreferenced/index.ts b/test/comparison-tests/projectReferencesMultiple/patch2/unreferenced/index.ts new file mode 100644 index 000000000..14345b5e2 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch2/unreferenced/index.ts @@ -0,0 +1,3 @@ +export function unreferenced() { + return "i am unreferenced without error"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/patch3/unreferencedIndirect/index.ts b/test/comparison-tests/projectReferencesMultiple/patch3/unreferencedIndirect/index.ts new file mode 100644 index 000000000..6813358de --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch3/unreferencedIndirect/index.ts @@ -0,0 +1,3 @@ +export function unreferencedIndirect(): number { + return "i am unreferencedIndirect now is error"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/patch4/unreferencedIndirect/index.ts b/test/comparison-tests/projectReferencesMultiple/patch4/unreferencedIndirect/index.ts new file mode 100644 index 000000000..3e6f53212 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch4/unreferencedIndirect/index.ts @@ -0,0 +1,3 @@ +export function unreferencedIndirect() { + return "i am unreferencedIndirect now fixed error"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/patch5/unreferenced/index.ts b/test/comparison-tests/projectReferencesMultiple/patch5/unreferenced/index.ts new file mode 100644 index 000000000..cfa941c30 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/patch5/unreferenced/index.ts @@ -0,0 +1,3 @@ +export function unreferenced(): number { + return "i am unreferenced with error"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/tsconfig.json new file mode 100644 index 000000000..97f04b7ee --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/tsconfig.json @@ -0,0 +1,10 @@ +{ +"files": [ + "./app.ts" + ], + "references": [ + { "path": "./lib" }, + { "path": "./utils" }, + { "path": "./unreferenced" }, + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/unreferenced/index.ts b/test/comparison-tests/projectReferencesMultiple/unreferenced/index.ts new file mode 100644 index 000000000..3601112f7 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/unreferenced/index.ts @@ -0,0 +1,3 @@ +export function unreferenced() { + return "i am unreferenced"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/unreferenced/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/unreferenced/tsconfig.json new file mode 100644 index 000000000..fde6864ed --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/unreferenced/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../unreferencedIndirect" } + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/index.ts b/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/index.ts new file mode 100644 index 000000000..3ac50dc17 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/index.ts @@ -0,0 +1,3 @@ +export function unreferencedIndirect() { + return "i am unreferencedIndirect"; +} diff --git a/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/tsconfig.json new file mode 100644 index 000000000..b3df08516 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/unreferencedIndirect/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "composite": true + } +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/utils/index.ts b/test/comparison-tests/projectReferencesMultiple/utils/index.ts new file mode 100644 index 000000000..713ee249d --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/utils/index.ts @@ -0,0 +1,4 @@ +import { common } from "../common"; +export function utils() { + common(); +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/utils/tsconfig.json b/test/comparison-tests/projectReferencesMultiple/utils/tsconfig.json new file mode 100644 index 000000000..996b12d7c --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/utils/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../common" }, + { "path": "../indirectWithError" } + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesMultiple/webpack.config.js b/test/comparison-tests/projectReferencesMultiple/webpack.config.js new file mode 100644 index 000000000..a8a142774 --- /dev/null +++ b/test/comparison-tests/projectReferencesMultiple/webpack.config.js @@ -0,0 +1,21 @@ +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") } } + diff --git a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-3.8/output.txt index f18a67b4a..9037e81ef 100644 --- a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-3.8/output.txt @@ -1,6 +1,8 @@ Asset Size Chunks Chunk Names bundle.js 4.7 KiB main [emitted] main + ../lib/foo.js 65 bytes [emitted] ../lib/foo.d.ts 35 bytes [emitted] + ../lib/index.js 156 bytes [emitted] ../lib/index.d.ts 107 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js diff --git a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/bundle.js index a5f3848a9..70a05d82f 100644 --- a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.foo = 'foo';\n\n\n//# sourceURL=webpack:///./lib/foo.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.foo = 'foo';\r\n\n\n//# sourceURL=webpack:///./lib/foo.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar foo_1 = __webpack_require__(/*! ./foo */ \"./lib/foo.ts\");\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n foo: foo_1.foo\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +eval("\r\nexports.__esModule = true;\r\nvar foo_1 = __webpack_require__(/*! ./foo */ \"./lib/foo.ts\");\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n foo: foo_1.foo\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/output.txt index f24a8ccf2..f031a0aa8 100644 --- a/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNoSourceMap/expectedOutput-transpile-3.8/output.txt @@ -1,6 +1,11 @@ - Asset Size Chunks Chunk Names -bundle.js 4.79 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.73 KiB main [emitted] main + ../lib/foo.js 65 bytes [emitted] + ../lib/foo.d.ts 35 bytes [emitted] + ../lib/index.js 156 bytes [emitted] + ../lib/index.d.ts 107 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/foo.ts] 98 bytes {main} [built] -[./lib/index.ts] 183 bytes {main} [built] \ No newline at end of file +[./lib/foo.ts] 65 bytes {main} [built] +[./lib/index.ts] 156 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNoSourceMap/tsconfig.json b/test/comparison-tests/projectReferencesNoSourceMap/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesNoSourceMap/tsconfig.json +++ b/test/comparison-tests/projectReferencesNoSourceMap/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-3.8/output.txt index d3e7545db..6a42c7a13 100644 --- a/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt/tsconfig.json b/test/comparison-tests/projectReferencesNotBuilt/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesNotBuilt/tsconfig.json +++ b/test/comparison-tests/projectReferencesNotBuilt/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt index ebce60ca7..aeba9f805 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt @@ -1,9 +1,11 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../app.d.ts 11 bytes [emitted] - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] - ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-3.8/output.txt index 411ded624..3cc5d6649 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-3.8/output.txt @@ -1,12 +1,14 @@ - Asset Size Chunks Chunk Names - bundle.js 4.31 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.31 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 147 bytes {main} [built] [1 error] [./lib/index.ts] 104 bytes {main} [built] ERROR in app.ts ./app.ts -[tsl] ERROR in app.ts(3,46) +[tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/bundle.js index 6cc3ae78e..bb805dd67 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/output.txt index d15b24b9a..012639711 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.35 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 183 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/tsconfig.json b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/tsconfig.json +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-3.8/output.txt index 243c853a9..c8b5badaf 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-3.8/output.txt @@ -1,14 +1,16 @@ - Asset Size Chunks Chunk Names - bundle.js 4.31 KiB main [emitted] main - ../app.d.ts 11 bytes [emitted] - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] - ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.31 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 147 bytes {main} [built] [1 error] [./lib/index.ts] 104 bytes {main} [built] ERROR in app.ts ./app.ts -[tsl] ERROR in app.ts(3,46) +[tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index 6cc3ae78e..bb805dd67 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index d15b24b9a..012639711 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.35 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 183 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-3.8/output.txt index 411ded624..3cc5d6649 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-3.8/output.txt @@ -1,12 +1,14 @@ - Asset Size Chunks Chunk Names - bundle.js 4.31 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.31 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 147 bytes {main} [built] [1 error] [./lib/index.ts] 104 bytes {main} [built] ERROR in app.ts ./app.ts -[tsl] ERROR in app.ts(3,46) +[tsl] ERROR in app.ts(3,46)  TS2339: Property 'four' does not exist on type '{ one: number; two: number; three: number; }'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/bundle.js index 6cc3ae78e..bb805dd67 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/output.txt index d15b24b9a..012639711 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_ErrorInProject_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.35 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 183 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.8/output.txt index 2629a55d0..1de5e3500 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-3.8/output.txt @@ -12,11 +12,7 @@ Error: TypeScript emitted no output for lib\index.ts. The most common cause for at Object.loader (dist\index.js:22:12) @ ./app.ts 3:12-28 -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SemanticErrorInReference/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SemanticErrorInReference/lib/index.ts'. - ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(6,7) +[tsl] ERROR in lib\index.ts(6,7)  TS2322: Type '10' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/bundle.js index 12b30effa..c49e3d931 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\nvar y = 10;\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/output.txt index f00582869..b6a02f4ad 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/expectedOutput-transpile-3.8/output.txt @@ -1,12 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main +bundle.js 4.74 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} [built] [2 errors] -[./lib/index.ts] 145 bytes {main} [built] +[./app.ts] 167 bytes {main} [built] [1 error] +[./lib/index.ts] 518 bytes {main} [built] [failed] [1 error] -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SemanticErrorInReference/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SemanticErrorInReference/lib/index.ts'. +ERROR in [tsl] ERROR in lib\index.ts(6,7) + TS2322: Type '10' is not assignable to type 'string'. -ERROR in [tsl] ERROR in lib\index.ts(6,7) - TS2322: Type '10' is not assignable to type 'string'. \ No newline at end of file +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/tsconfig.json b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/tsconfig.json +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index 12b30effa..29a1495a0 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\nvar y = 10;\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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_Composite_WatchApi.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index 237768484..9ba3b5891 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,8 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main +bundle.js 4.76 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] [1 error] -[./lib/index.ts] 145 bytes {main} [built] +[./lib/index.ts] 537 bytes {main} [built] [failed] [1 error] -ERROR in [tsl] ERROR in lib\index.ts(6,7) - TS2322: Type '10' is not assignable to type 'string'. \ No newline at end of file +ERROR in [tsl] ERROR in lib\index.ts(6,7) + TS2322: Type '10' is not assignable to type 'string'. + +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-3.8/output.txt index a9446a546..c3dcd4e32 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-3.8/output.txt @@ -12,11 +12,7 @@ Error: TypeScript emitted no output for lib\index.ts. The most common cause for at Object.loader (dist\index.js:22:12) @ ./app.ts 3:12-28 -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.ts'. - ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(6,7) +[tsl] ERROR in lib\index.ts(6,7)  TS2322: Type '10' is not assignable to type 'string'. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js index 12b30effa..e370ce74d 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\nvar y = 10;\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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_WatchApi.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt index 1b2499099..8030ed7c8 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,12 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.37 KiB main [emitted] main +bundle.js 4.75 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} [built] [2 errors] -[./lib/index.ts] 145 bytes {main} [built] +[./app.ts] 167 bytes {main} [built] [1 error] +[./lib/index.ts] 527 bytes {main} [built] [failed] [1 error] -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SemanticErrorInReference_WatchApi/lib/index.ts'. +ERROR in [tsl] ERROR in lib\index.ts(6,7) + TS2322: Type '10' is not assignable to type 'string'. -ERROR in [tsl] ERROR in lib\index.ts(6,7) - TS2322: Type '10' is not assignable to type 'string'. \ No newline at end of file +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.8/output.txt index fdd0dfe4c..a474c3fb3 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-3.8/output.txt @@ -12,11 +12,7 @@ Error: TypeScript emitted no output for lib\index.ts. The most common cause for at Object.loader (dist\index.js:22:12) @ ./app.ts 3:12-28 -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.ts'. - ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(4,12) +[tsl] ERROR in lib\index.ts(4,12)  TS1136: Property assignment expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/bundle.js index cf22a4206..45fa337aa 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/output.txt index 07bb3ce02..3a2d8b229 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/expectedOutput-transpile-3.8/output.txt @@ -1,12 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.36 KiB main [emitted] main +bundle.js 4.74 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} [built] [2 errors] -[./lib/index.ts] 134 bytes {main} [built] +[./app.ts] 167 bytes {main} [built] [1 error] +[./lib/index.ts] 516 bytes {main} [built] [failed] [1 error] -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference/lib/index.ts'. +ERROR in [tsl] ERROR in lib\index.ts(4,12) + TS1136: Property assignment expected. -ERROR in [tsl] ERROR in lib\index.ts(4,12) - TS1136: Property assignment expected. \ No newline at end of file +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/tsconfig.json b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/tsconfig.json +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index cf22a4206..4518f301e 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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_Composite_WatchApi.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index 1fdad5f13..4805eefbb 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,8 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.36 KiB main [emitted] main +bundle.js 4.76 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] [1 error] -[./lib/index.ts] 134 bytes {main} [built] +[./lib/index.ts] 535 bytes {main} [built] [failed] [1 error] -ERROR in [tsl] ERROR in lib\index.ts(4,12) - TS1136: Property assignment expected. \ No newline at end of file +ERROR in [tsl] ERROR in lib\index.ts(4,12) + TS1136: Property assignment expected. + +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-3.8/output.txt index 40fb18df5..e5b3f72ab 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-3.8/output.txt @@ -12,11 +12,7 @@ Error: TypeScript emitted no output for lib\index.ts. The most common cause for at Object.loader (dist\index.js:22:12) @ ./app.ts 3:12-28 -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.ts'. - ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(4,12) +[tsl] ERROR in lib\index.ts(4,12)  TS1136: Property assignment expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js index cf22a4206..09e2fc8da 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -103,10 +103,9 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li !*** ./lib/index.ts ***! \**********************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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_WatchApi.transpile//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:87:18)/n at successLoader (c://github//ts-loader//dist//index.js:73:9)/n at Object.loader (c://github//ts-loader//dist//index.js:24:5)\");\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt index 7de607cf2..0fdc347cf 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,12 +1,16 @@ Asset Size Chunks Chunk Names -bundle.js 4.36 KiB main [emitted] main +bundle.js 4.75 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} [built] [2 errors] -[./lib/index.ts] 134 bytes {main} [built] +[./app.ts] 167 bytes {main} [built] [1 error] +[./lib/index.ts] 525 bytes {main} [built] [failed] [1 error] -ERROR in tsconfig.json -[tsl] ERROR - TS6305: Output file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.d.ts' has not been built from source file '/.test/projectReferencesNotBuilt_SyntaxErrorInReference_WatchApi/lib/index.ts'. +ERROR in [tsl] ERROR in lib\index.ts(4,12) + TS1136: Property assignment expected. -ERROR in [tsl] ERROR in lib\index.ts(4,12) - TS1136: Property assignment expected. \ No newline at end of file +ERROR in ./lib/index.ts +Module build failed (from /index.js): +Error: TypeScript emitted no output for lib\index.ts. The most common cause for this is having errors when building referenced projects. + at makeSourceMapAndFinish (dist\index.js:87:18) + at successLoader (dist\index.js:73:9) + at Object.loader (dist\index.js:24:5) + @ ./app.ts 3:12-28 \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-3.8/output.txt index d3e7545db..6a42c7a13 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesNotBuilt_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.8/output.txt index 64fcf5538..5d3b8358e 100644 --- a/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesOutDir/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - 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 70 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/out/index.js.map 190 bytes [emitted] + ../lib/out/index.js 137 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/output.txt index f31c64018..6fe9b0dc9 100644 --- a/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesOutDir/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/out/index.js.map 190 bytes [emitted] + ../lib/out/index.js 137 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDir/tsconfig.json b/test/comparison-tests/projectReferencesOutDir/tsconfig.json index 03974daa7..6d9798ff7 100644 --- a/test/comparison-tests/projectReferencesOutDir/tsconfig.json +++ b/test/comparison-tests/projectReferencesOutDir/tsconfig.json @@ -1,4 +1,7 @@ { +"files": [ + "./app.ts" + ], "references": [ { "path": "./lib" } ] diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/app.ts new file mode 100644 index 000000000..a83f2065b --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three); diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/bundle.js new file mode 100644 index 000000000..7b491a754 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/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 static exports found */ +/***/ (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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/output.txt new file mode 100644 index 000000000..5d3b8358e --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/out/index.js.map 190 bytes [emitted] + ../lib/out/index.js 137 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 131 bytes {main} [built] +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/bundle.js new file mode 100644 index 000000000..e41275feb --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/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 static exports found */ +/***/ (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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/output.txt new file mode 100644 index 000000000..a7d851353 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/out/index.js.map 223 bytes [emitted] + ../lib/out/index.js 169 bytes [emitted] + ../lib/out/index.d.ts 108 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 131 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/bundle.js new file mode 100644 index 000000000..d7d6292ed --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/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 static exports found */ +/***/ (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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/output.txt new file mode 100644 index 000000000..863917568 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch1/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.36 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/bundle.js new file mode 100644 index 000000000..d7d6292ed --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/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 static exports found */ +/***/ (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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/output.txt new file mode 100644 index 000000000..b24dcfcfb --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch2/output.txt @@ -0,0 +1,15 @@ + Asset Size Chunks Chunk Names +bundle.js 4.36 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] [2 errors] + +ERROR in lib\index.ts +./lib/index.ts +[tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in lib\index.ts +./lib/index.ts +[tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/bundle.js new file mode 100644 index 000000000..4baf2067a --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/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 static exports found */ +/***/ (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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/output.txt new file mode 100644 index 000000000..9e41c2cf6 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch3/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main + ../lib/out/index.js.map 230 bytes [emitted] + ../lib/out/index.js 165 bytes [emitted] + ../lib/out/index.d.ts 127 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/bundle.js new file mode 100644 index 000000000..5399bc407 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/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 static exports found */ +/***/ (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, lib_1.lib.ffive); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/output.txt new file mode 100644 index 000000000..0593bdf58 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch4/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names +bundle.js 4.38 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 186 bytes {main} [built] [1 error] +[./lib/index.ts] 132 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/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/bundle.js new file mode 100644 index 000000000..4d4687802 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/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 static exports found */ +/***/ (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, lib_1.lib.five); // consume new number\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/output.txt new file mode 100644 index 000000000..bd093b647 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-3.8/patch5/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.38 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 185 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/bundle.js new file mode 100644 index 000000000..3c799c9b5 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/output.txt new file mode 100644 index 000000000..6fe9b0dc9 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/out/index.js.map 190 bytes [emitted] + ../lib/out/index.js 137 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 167 bytes {main} [built] +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/bundle.js new file mode 100644 index 000000000..dd819fcfc --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/output.txt new file mode 100644 index 000000000..a0cefb79d --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main + ../lib/out/index.js.map 223 bytes [emitted] + ../lib/out/index.js 169 bytes [emitted] + ../lib/out/index.d.ts 108 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 167 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/bundle.js new file mode 100644 index 000000000..edc165433 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/output.txt new file mode 100644 index 000000000..055ff64ce --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch1/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.42 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] +[./lib/index.ts] 164 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/bundle.js new file mode 100644 index 000000000..edc165433 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\r\nexports.lib = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/output.txt new file mode 100644 index 000000000..a60242613 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch2/output.txt @@ -0,0 +1,11 @@ + Asset Size Chunks Chunk Names +bundle.js 4.43 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] [2 errors] +[./lib/index.ts] 168 bytes {main} [built] + +ERROR in [tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in [tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/bundle.js new file mode 100644 index 000000000..659fba3e4 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/output.txt new file mode 100644 index 000000000..d82796e3e --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch3/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.4 KiB main [emitted] main + ../lib/out/index.js.map 230 bytes [emitted] + ../lib/out/index.js 165 bytes [emitted] + ../lib/out/index.d.ts 127 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/bundle.js new file mode 100644 index 000000000..a60eee078 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/output.txt new file mode 100644 index 000000000..a866098ce --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch4/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.44 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 222 bytes {main} [built] +[./lib/index.ts] 160 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/bundle.js new file mode 100644 index 000000000..8f0add3cc --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); + +/***/ }), + +/***/ "./lib/index.ts": +/*!**********************!*\ + !*** ./lib/index.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\r\nexports.__esModule = true;\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?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/output.txt new file mode 100644 index 000000000..dd53f5541 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/expectedOutput-transpile-3.8/patch5/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.44 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 221 bytes {main} [built] +[./lib/index.ts] 160 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/.gitignore b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/.gitignore new file mode 100644 index 000000000..7b7f62099 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/.gitignore @@ -0,0 +1 @@ +!*.js.map \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/index.ts new file mode 100644 index 000000000..669ca7b3d --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/index.ts @@ -0,0 +1,5 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/package.json b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/package.json new file mode 100644 index 000000000..fedf26a0b --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/package.json @@ -0,0 +1,12 @@ +{ + "name": "lib", + "version": "1.0.0", + "description": "", + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/tsconfig.json b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/tsconfig.json new file mode 100644 index 000000000..2ca71a202 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/lib/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "sourceMap": true, + "outDir": "./out" + }, + "files": [ + "./index.ts" + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch0/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch0/lib/index.ts new file mode 100644 index 000000000..bcc33a8ba --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch0/lib/index.ts @@ -0,0 +1,6 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4 // Add new number +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch1/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch1/app.ts new file mode 100644 index 000000000..ef0588c25 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch1/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch2/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch2/lib/index.ts new file mode 100644 index 000000000..50c5a28cf --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch2/lib/index.ts @@ -0,0 +1,7 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4, // Add new number + , +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch3/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch3/lib/index.ts new file mode 100644 index 000000000..2f41de9ea --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch3/lib/index.ts @@ -0,0 +1,7 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4, // Add new number + five: 5, +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch4/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch4/app.ts new file mode 100644 index 000000000..60b81231a --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch4/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four, lib.ffive); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch5/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch5/app.ts new file mode 100644 index 000000000..57f5f312c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/patch5/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four, lib.five); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/tsconfig.json b/test/comparison-tests/projectReferencesOutDirWithPackageJson/tsconfig.json new file mode 100644 index 000000000..6d9798ff7 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/tsconfig.json @@ -0,0 +1,8 @@ +{ +"files": [ + "./app.ts" + ], + "references": [ + { "path": "./lib" } + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJson/webpack.config.js b/test/comparison-tests/projectReferencesOutDirWithPackageJson/webpack.config.js new file mode 100644 index 000000000..81cd477e4 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJson/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") } } \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/app.ts new file mode 100644 index 000000000..a83f2065b --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three); diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/bundle.js new file mode 100644 index 000000000..60f7f137c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/output.txt new file mode 100644 index 000000000..07231c09e --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.34 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 131 bytes {main} [built] +[./lib/out/index.js] 130 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/bundle.js new file mode 100644 index 000000000..60f7f137c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/output.txt new file mode 100644 index 000000000..ce5d245f0 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.34 KiB main [emitted] main + ../lib/out/index.js.map 223 bytes [emitted] + ../lib/out/index.js 169 bytes [emitted] + ../lib/out/index.d.ts 108 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 131 bytes {main} [built] +[./lib/out/index.js] 130 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/bundle.js new file mode 100644 index 000000000..e6463502c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/output.txt new file mode 100644 index 000000000..4f26ba788 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch1/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.4 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/out/index.js] 161 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/bundle.js new file mode 100644 index 000000000..e6463502c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/output.txt new file mode 100644 index 000000000..b6af07923 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch2/output.txt @@ -0,0 +1,13 @@ + Asset Size Chunks Chunk Names +bundle.js 4.4 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/out/index.js] 161 bytes {main} + +ERROR in lib\index.ts +[tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in lib\index.ts +[tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/bundle.js new file mode 100644 index 000000000..e6463502c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/output.txt new file mode 100644 index 000000000..45e4a892c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch3/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.4 KiB main [emitted] main + ../lib/out/index.js.map 230 bytes [emitted] + ../lib/out/index.js 165 bytes [emitted] + ../lib/out/index.d.ts 127 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 169 bytes {main} [built] +[./lib/out/index.js] 161 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/bundle.js new file mode 100644 index 000000000..ba8f874ec --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/output.txt new file mode 100644 index 000000000..337d531c9 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch4/output.txt @@ -0,0 +1,10 @@ + Asset Size Chunks Chunk Names +bundle.js 4.42 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 186 bytes {main} [built] [1 error] +[./lib/out/index.js] 156 bytes {main} [built] + +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/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/bundle.js new file mode 100644 index 000000000..050c51919 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/output.txt new file mode 100644 index 000000000..eed2af970 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-3.8/patch5/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.42 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 185 bytes {main} [built] +[./lib/out/index.js] 156 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js new file mode 100644 index 000000000..a4bc091aa --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\nconsole.log(lib_1.lib.one, lib_1.lib.two, lib_1.lib.three);\n\n\n//# sourceURL=webpack:///./app.ts?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/output.txt new file mode 100644 index 000000000..cef6997fc --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.37 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 167 bytes {main} [built] +[./lib/out/index.js] 130 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js new file mode 100644 index 000000000..e3e713988 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt new file mode 100644 index 000000000..0cc24db4b --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.44 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] +[./lib/out/index.js] 161 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch2/output.txt new file mode 100644 index 000000000..9b41ecb08 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch2/output.txt @@ -0,0 +1,11 @@ + Asset Size Chunks Chunk Names +bundle.js 4.44 KiB main main +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] [2 errors] +[./lib/out/index.js] 161 bytes {main} + +ERROR in [tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in [tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch3/output.txt new file mode 100644 index 000000000..19b95a267 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch3/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names + bundle.js 4.44 KiB main main + ../lib/out/index.js.map 230 bytes [emitted] + ../lib/out/index.js 165 bytes [emitted] + ../lib/out/index.d.ts 127 bytes [emitted] +../lib/out/tsconfig.tsbuildinfo 70 KiB [emitted] +Entrypoint main = bundle.js +[./app.ts] 205 bytes {main} [built] +[./lib/out/index.js] 161 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/bundle.js new file mode 100644 index 000000000..7cef98c7c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/output.txt new file mode 100644 index 000000000..85d645c15 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch4/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.45 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 222 bytes {main} [built] +[./lib/out/index.js] 156 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/bundle.js new file mode 100644 index 000000000..1696123c8 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/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 static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ./lib */ \"./lib/out/index.js\");\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?"); + +/***/ }), + +/***/ "./lib/out/index.js": +/*!**************************!*\ + !*** ./lib/out/index.js ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nexports.__esModule = true;\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./lib/out/index.js?"); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/output.txt b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/output.txt new file mode 100644 index 000000000..4185b7735 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/expectedOutput-transpile-3.8/patch5/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 4.45 KiB main [emitted] main +Entrypoint main = bundle.js +[./app.ts] 221 bytes {main} [built] +[./lib/out/index.js] 156 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/.gitignore b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/.gitignore new file mode 100644 index 000000000..7b7f62099 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/.gitignore @@ -0,0 +1 @@ +!*.js.map \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/index.ts new file mode 100644 index 000000000..669ca7b3d --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/index.ts @@ -0,0 +1,5 @@ +export const lib = { + one: 1, + two: 2, + three: 3 +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/package.json b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/package.json new file mode 100644 index 000000000..fedf26a0b --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/package.json @@ -0,0 +1,12 @@ +{ + "name": "lib", + "version": "1.0.0", + "description": "", + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/tsconfig.json b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/tsconfig.json new file mode 100644 index 000000000..2ca71a202 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/lib/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "sourceMap": true, + "outDir": "./out" + }, + "files": [ + "./index.ts" + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch0/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch0/lib/index.ts new file mode 100644 index 000000000..bcc33a8ba --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch0/lib/index.ts @@ -0,0 +1,6 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4 // Add new number +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch1/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch1/app.ts new file mode 100644 index 000000000..ef0588c25 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch1/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch2/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch2/lib/index.ts new file mode 100644 index 000000000..50c5a28cf --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch2/lib/index.ts @@ -0,0 +1,7 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4, // Add new number + , +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch3/lib/index.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch3/lib/index.ts new file mode 100644 index 000000000..2f41de9ea --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch3/lib/index.ts @@ -0,0 +1,7 @@ +export const lib = { + one: 1, + two: 2, + three: 3, + four: 4, // Add new number + five: 5, +}; diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch4/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch4/app.ts new file mode 100644 index 000000000..60b81231a --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch4/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four, lib.ffive); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch5/app.ts b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch5/app.ts new file mode 100644 index 000000000..57f5f312c --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/patch5/app.ts @@ -0,0 +1,3 @@ +import { lib } from './lib'; + +console.log(lib.one, lib.two, lib.three, lib.four, lib.five); // consume new number diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/tsconfig.json b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/tsconfig.json new file mode 100644 index 000000000..6d9798ff7 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/tsconfig.json @@ -0,0 +1,8 @@ +{ +"files": [ + "./app.ts" + ], + "references": [ + { "path": "./lib" } + ] +} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/webpack.config.js b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/webpack.config.js new file mode 100644 index 000000000..81cd477e4 --- /dev/null +++ b/test/comparison-tests/projectReferencesOutDirWithPackageJsonAlreadyBuilt/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") } } \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.8/output.txt index 772038f58..d284a2f44 100644 --- a/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesRootDir/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.66 KiB main [emitted] main - ../lib/out/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 74.3 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.66 KiB main [emitted] main + ../lib/out/index.js.map 202 bytes [emitted] + ../lib/out/index.js 99 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 74.3 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/projectReferencesRootDir/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesRootDir/expectedOutput-transpile-3.8/output.txt index fa144b2cd..d284a2f44 100644 --- a/test/comparison-tests/projectReferencesRootDir/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesRootDir/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.65 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.66 KiB main [emitted] main + ../lib/out/index.js.map 202 bytes [emitted] + ../lib/out/index.js 99 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 74.3 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 81 bytes {main} [built] -[./lib/src/index.ts] 61 bytes {main} [built] \ 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/projectReferencesRootDirInvalidConfig/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.8/output.txt index 772038f58..d284a2f44 100644 --- a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.66 KiB main [emitted] main - ../lib/out/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 74.3 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.66 KiB main [emitted] main + ../lib/out/index.js.map 202 bytes [emitted] + ../lib/out/index.js 99 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 74.3 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/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-transpile-3.8/output.txt index fa144b2cd..d284a2f44 100644 --- a/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.65 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.66 KiB main [emitted] main + ../lib/out/index.js.map 202 bytes [emitted] + ../lib/out/index.js 99 bytes [emitted] + ../lib/out/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 74.3 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 81 bytes {main} [built] -[./lib/src/index.ts] 61 bytes {main} [built] \ 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/projectReferencesRootDirInvalidConfig/tsconfig.json b/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json index cd33708ee..b908d50de 100644 --- a/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json +++ b/test/comparison-tests/projectReferencesRootDirInvalidConfig/tsconfig.json @@ -1,8 +1,11 @@ { - "compilerOptions": { - "target": "esnext" - }, - "references": [ - { "path": "./lib" } - ] + "compilerOptions": { + "target": "esnext" + }, + "files": [ + "./app.ts" + ], + "references": [ + { "path": "./lib" } + ] } \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/output.txt index d3e7545db..6a42c7a13 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch0/output.txt index 2eeefbb21..52a5441eb 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch0/output.txt @@ -1,5 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch2/output.txt index 155475ba2..b24dcfcfb 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch2/output.txt @@ -1,17 +1,15 @@ - Asset Size Chunks Chunk Names - bundle.js 4.36 KiB main [emitted] main - ../lib/index.d.ts 108 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names +bundle.js 4.36 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 169 bytes {main} [built] [./lib/index.ts] 136 bytes {main} [built] [2 errors] ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(6,3) +[tsl] ERROR in lib\index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(7,1) +[tsl] ERROR in lib\index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch3/output.txt index f9855ff04..c4258a71a 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-3.8/patch3/output.txt @@ -1,5 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.36 KiB main [emitted] main + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] ../lib/index.d.ts 127 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesWatch/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/bundle.js index b8a11c082..dd819fcfc 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/output.txt index 5bdc311de..89803539b 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.39 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/index.ts] 164 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch1/bundle.js index 4bfa7680a..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/bundle.js index 3ce80b633..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n} // Add new number\n;\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/output.txt index df2b4fb68..a60242613 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch2/output.txt @@ -1,5 +1,11 @@ Asset Size Chunks Chunk Names bundle.js 4.43 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 168 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] [2 errors] +[./lib/index.ts] 168 bytes {main} [built] + +ERROR in [tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in [tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/bundle.js index dd7a8066e..659fba3e4 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/output.txt index 2c28f842b..b98ffe647 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch3/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.42 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.4 KiB main [emitted] main + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] + ../lib/index.d.ts 127 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 160 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch4/bundle.js index 160d4488f..a60eee078 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch4/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch4/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch5/bundle.js index 9a42c42f7..8f0add3cc 100644 --- a/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch5/bundle.js +++ b/test/comparison-tests/projectReferencesWatch/expectedOutput-transpile-3.8/patch5/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/output.txt index 26ff60c6b..64a78458e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/output.txt @@ -1,8 +1,12 @@ - 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 67.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.8 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 107 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/patch0/output.txt index 1c3d5bb27..0a5fc811c 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-3.8/patch0/output.txt @@ -1,9 +1,13 @@ Asset Size Chunks Chunk Names bundle.js 4.82 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] ../lib/index.d.ts 89 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 197 bytes {main} \ No newline at end of file +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/output.txt index af28e43ce..f8b6ac8a8 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.88 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.84 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/helper.ts] 136 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} [built] \ No newline at end of file +[./lib/helper.ts] 107 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/bundle.js index 9b67527c2..16955d634 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/output.txt index 89950814d..a3a66b07b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch1/bundle.js index f4b1a4280..1a3b535ff 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/output.txt index fdfaf038b..8486d9d82 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/output.txt @@ -1,8 +1,5 @@ - Asset Size Chunks Chunk Names - 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.6 KiB [emitted] + Asset Size Chunks Chunk Names +bundle.js 4.77 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 100 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch0/output.txt index efdabdd85..aaf278006 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch0/output.txt @@ -1,8 +1,13 @@ Asset Size Chunks Chunk Names - bundle.js 4.8 KiB main [emitted] main + bundle.js 4.82 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/helper.ts] 100 bytes {main} +[./lib/helper.ts] 107 bytes {main} [./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch1/output.txt index 7e9c5b9b0..64d8efac9 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-3.8/patch1/output.txt @@ -1,9 +1,13 @@ Asset Size Chunks Chunk Names bundle.js 4.83 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 211 bytes {main} \ No newline at end of file +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/bundle.js index b43d2a289..a7014013d 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/output.txt index 82d28664a..56fb6d5dd 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 136 bytes {main} -[./lib/index.ts] 238 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 107 bytes {main} +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js index 489621be1..d8c1cbcfe 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt index 724ac0f9a..44dcb5f5b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch1/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.91 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.87 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 238 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 211 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch2/bundle.js index 448f9dade..ca8971b44 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt index 6cec9cd55..5645df8f1 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/output.txt @@ -1,10 +1,7 @@ - Asset Size Chunks Chunk Names - bundle.js 4.77 KiB main [emitted] main - ../app.d.ts 11 bytes [emitted] - ../lib/index.d.ts 84 bytes [emitted] - ../lib/helper.d.ts 87 bytes [emitted] -../lib/tsconfig.tsbuildinfo 72.6 KiB [emitted] - ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.77 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] +../tsconfig.tsbuildinfo 51.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 100 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt index c32db51c6..31619c09e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,9 +1,14 @@ Asset Size Chunks Chunk Names - bundle.js 4.8 KiB main [emitted] main - ../lib/index.d.ts 108 bytes [emitted] + bundle.js 4.82 KiB main [emitted] main ../app.d.ts 11 bytes [emitted] + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/helper.ts] 100 bytes {main} +[./lib/helper.ts] 107 bytes {main} [./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch1/output.txt index eebd0e5c0..b79592e04 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-3.8/patch1/output.txt @@ -1,10 +1,14 @@ Asset Size Chunks Chunk Names bundle.js 4.83 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] - ../app.d.ts 11 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} +[./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 211 bytes {main} \ No newline at end of file +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index b43d2a289..a7014013d 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 82d28664a..56fb6d5dd 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 136 bytes {main} -[./lib/index.ts] 238 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 107 bytes {main} +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index 489621be1..d8c1cbcfe 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt index 724ac0f9a..44dcb5f5b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.91 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.87 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 238 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 211 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js index 448f9dade..ca8971b44 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/output.txt index fdfaf038b..8486d9d82 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/output.txt @@ -1,8 +1,5 @@ - Asset Size Chunks Chunk Names - 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.6 KiB [emitted] + Asset Size Chunks Chunk Names +bundle.js 4.77 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 100 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch0/output.txt index efdabdd85..aaf278006 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,8 +1,13 @@ Asset Size Chunks Chunk Names - bundle.js 4.8 KiB main [emitted] main + bundle.js 4.82 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] -[./lib/helper.ts] 100 bytes {main} +[./lib/helper.ts] 107 bytes {main} [./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch1/output.txt index 24bc679a7..64d8efac9 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-3.8/patch1/output.txt @@ -1,9 +1,13 @@ Asset Size Chunks Chunk Names bundle.js 4.83 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} +[./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 211 bytes {main} \ No newline at end of file +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index b43d2a289..a7014013d 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 82d28664a..56fb6d5dd 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 136 bytes {main} -[./lib/index.ts] 238 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 107 bytes {main} +[./lib/index.ts] 211 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index 489621be1..d8c1cbcfe 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt index 724ac0f9a..44dcb5f5b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch1/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.91 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.87 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 251 bytes [emitted] + ../lib/index.js 244 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 238 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 211 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js index 448f9dade..ca8971b44 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFilesAlreadyBuilt_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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 four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); +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 four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/output.txt index 23330c342..3231fc686 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/output.txt @@ -1,10 +1,14 @@ - Asset Size Chunks Chunk Names - bundle.js 4.8 KiB main [emitted] main - ../app.d.ts 11 bytes [emitted] - ../lib/index.d.ts 89 bytes [emitted] - ../lib/helper.d.ts 92 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] - ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.8 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 107 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt index 679d7a2ea..d7abe1eec 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,10 +1,14 @@ Asset Size Chunks Chunk Names bundle.js 4.82 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] ../lib/index.d.ts 89 bytes [emitted] - ../app.d.ts 11 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} +[./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 197 bytes {main} \ No newline at end of file +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index af28e43ce..f8b6ac8a8 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.88 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.84 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/helper.ts] 136 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} [built] \ No newline at end of file +[./lib/helper.ts] 107 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index 9b67527c2..16955d634 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 89950814d..a3a66b07b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index f4b1a4280..1a3b535ff 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/output.txt index 26ff60c6b..64a78458e 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/output.txt @@ -1,8 +1,12 @@ - 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 67.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.8 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 107 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/patch0/output.txt index f4f1ffdbd..0a5fc811c 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,9 +1,13 @@ Asset Size Chunks Chunk Names bundle.js 4.82 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] ../lib/index.d.ts 89 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 131 bytes {main} +[./app.ts] 131 bytes {main} [built] [./lib/helper.ts] 121 bytes {main} [built] -[./lib/index.ts] 197 bytes {main} \ No newline at end of file +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/bundle.js index 958994b3b..820866611 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +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?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/output.txt index af28e43ce..f8b6ac8a8 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.88 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.84 KiB main [emitted] main + ../lib/helper.js.map 189 bytes [emitted] + ../lib/helper.js 141 bytes [emitted] + ../lib/helper.d.ts 92 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/helper.ts] 136 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} [built] \ No newline at end of file +[./lib/helper.ts] 107 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index 9b67527c2..16955d634 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 89950814d..a3a66b07b 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,6 +1,13 @@ - Asset Size Chunks Chunk Names -bundle.js 4.9 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.85 KiB main [emitted] main + ../lib/helper.js.map 209 bytes [emitted] + ../lib/helper.js 155 bytes [emitted] + ../lib/helper.d.ts 111 bytes [emitted] + ../lib/index.js.map 231 bytes [emitted] + ../lib/index.js 230 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.8 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/helper.ts] 149 bytes {main} [built] -[./lib/index.ts] 225 bytes {main} \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/helper.ts] 121 bytes {main} [built] +[./lib/index.ts] 197 bytes {main} \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index f4b1a4280..1a3b535ff 100644 --- a/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatchRefWithTwoFiles_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.helper = {\n one: 1,\n two: 2,\n three: 3,\n four: 4\n};\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); +eval("\r\nexports.__esModule = true;\r\nexports.helper = {\r\n one: 1,\r\n two: 2,\r\n three: 3,\r\n four: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/helper.ts?"); /***/ }), @@ -118,7 +118,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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?"); +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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/output.txt index ebce60ca7..aeba9f805 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/output.txt @@ -1,9 +1,11 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../app.d.ts 11 bytes [emitted] - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] - ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../app.d.ts 11 bytes [emitted] + ../tsconfig.tsbuildinfo 51.8 KiB [emitted] + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt index f40387cdc..f5e4a79c5 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,7 +1,9 @@ Asset Size Chunks Chunk Names bundle.js 4.33 KiB main [emitted] main - ../lib/index.d.ts 108 bytes [emitted] ../app.d.ts 11 bytes [emitted] + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch2/output.txt index b237c917d..88a870dc5 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch2/output.txt @@ -1,18 +1,16 @@ - Asset Size Chunks Chunk Names - bundle.js 4.36 KiB main [emitted] main - ../lib/index.d.ts 108 bytes [emitted] - ../app.d.ts 11 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main +../app.d.ts 11 bytes [emitted] Entrypoint main = bundle.js [./app.ts] 169 bytes {main} [built] [./lib/index.ts] 136 bytes {main} [built] [2 errors] ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(6,3) +[tsl] ERROR in lib\index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(7,1) +[tsl] ERROR in lib\index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch3/output.txt index ed333e3ef..11ad9943c 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-3.8/patch3/output.txt @@ -1,7 +1,9 @@ Asset Size Chunks Chunk Names bundle.js 4.36 KiB main [emitted] main - ../lib/index.d.ts 127 bytes [emitted] ../app.d.ts 11 bytes [emitted] + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] + ../lib/index.d.ts 127 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 169 bytes {main} [built] diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index b8a11c082..dd819fcfc 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 5bdc311de..89803539b 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.39 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/index.ts] 164 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index 4bfa7680a..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js index 3ce80b633..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n} // Add new number\n;\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt index df2b4fb68..a60242613 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt @@ -1,5 +1,11 @@ Asset Size Chunks Chunk Names bundle.js 4.43 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 168 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] [2 errors] +[./lib/index.ts] 168 bytes {main} [built] + +ERROR in [tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in [tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js index dd7a8066e..659fba3e4 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt index 2c28f842b..b98ffe647 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.42 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.4 KiB main [emitted] main + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] + ../lib/index.d.ts 127 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 160 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js index 160d4488f..a60eee078 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js index 9a42c42f7..8f0add3cc 100644 --- a/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_Composite_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/output.txt index d3e7545db..6a42c7a13 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/output.txt @@ -1,7 +1,9 @@ - Asset Size Chunks Chunk Names - bundle.js 4.29 KiB main [emitted] main - ../lib/index.d.ts 89 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names + bundle.js 4.29 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 131 bytes {main} [built] [./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch0/output.txt index 2eeefbb21..52a5441eb 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch0/output.txt @@ -1,5 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] ../lib/index.d.ts 108 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch2/output.txt index 155475ba2..b24dcfcfb 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch2/output.txt @@ -1,17 +1,15 @@ - Asset Size Chunks Chunk Names - bundle.js 4.36 KiB main [emitted] main - ../lib/index.d.ts 108 bytes [emitted] -../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] + Asset Size Chunks Chunk Names +bundle.js 4.36 KiB main [emitted] main Entrypoint main = bundle.js [./app.ts] 169 bytes {main} [built] [./lib/index.ts] 136 bytes {main} [built] [2 errors] ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(6,3) +[tsl] ERROR in lib\index.ts(6,3)  TS1136: Property assignment expected. ERROR in lib\index.ts ./lib/index.ts -[tsl] ERROR in lib\index.ts(7,1) +[tsl] ERROR in lib\index.ts(7,1)  TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch3/output.txt index f9855ff04..c4258a71a 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-3.8/patch3/output.txt @@ -1,5 +1,7 @@ Asset Size Chunks Chunk Names bundle.js 4.36 KiB main [emitted] main + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] ../lib/index.d.ts 127 bytes [emitted] ../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/bundle.js index a59c4688b..3c799c9b5 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: 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/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/output.txt index f31c64018..9af9848b3 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.35 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.33 KiB main [emitted] main + ../lib/index.js.map 187 bytes [emitted] + ../lib/index.js 137 bytes [emitted] + ../lib/index.d.ts 89 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js [./app.ts] 167 bytes {main} [built] -[./lib/index.ts] 133 bytes {main} [built] \ No newline at end of file +[./lib/index.ts] 104 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js index b8a11c082..dd819fcfc 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt index 5bdc311de..89803539b 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch0/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.39 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.36 KiB main [emitted] main + ../lib/index.js.map 220 bytes [emitted] + ../lib/index.js 169 bytes [emitted] + ../lib/index.d.ts 108 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 167 bytes {main} -[./lib/index.ts] 164 bytes {main} [built] \ No newline at end of file +[./app.ts] 167 bytes {main} [built] +[./lib/index.ts] 136 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js index 4bfa7680a..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch1/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4 // Add new number\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js index 3ce80b633..edc165433 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lib = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n} // Add new number\n;\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 four: 4 // Add new number\r\n};\r\n\n\n//# sourceURL=webpack:///./lib/index.ts?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt index df2b4fb68..a60242613 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch2/output.txt @@ -1,5 +1,11 @@ Asset Size Chunks Chunk Names bundle.js 4.43 KiB main [emitted] main Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 168 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] [2 errors] +[./lib/index.ts] 168 bytes {main} [built] + +ERROR in [tsl] ERROR in lib\index.ts(6,3) + TS1136: Property assignment expected. + +ERROR in [tsl] ERROR in lib\index.ts(7,1) + TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js index dd7a8066e..659fba3e4 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt index 2c28f842b..b98ffe647 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch3/output.txt @@ -1,5 +1,9 @@ - Asset Size Chunks Chunk Names -bundle.js 4.42 KiB main [emitted] main + Asset Size Chunks Chunk Names + bundle.js 4.4 KiB main [emitted] main + ../lib/index.js.map 227 bytes [emitted] + ../lib/index.js 165 bytes [emitted] + ../lib/index.d.ts 127 bytes [emitted] +../lib/tsconfig.tsbuildinfo 67.4 KiB [emitted] Entrypoint main = bundle.js -[./app.ts] 205 bytes {main} -[./lib/index.ts] 160 bytes {main} [built] \ No newline at end of file +[./app.ts] 205 bytes {main} [built] +[./lib/index.ts] 132 bytes {main} [built] \ No newline at end of file diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js index 160d4488f..a60eee078 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch4/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js index 9a42c42f7..8f0add3cc 100644 --- a/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js +++ b/test/comparison-tests/projectReferencesWatch_WatchApi/expectedOutput-transpile-3.8/patch5/bundle.js @@ -106,7 +106,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar li /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\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?"); +eval("\r\nexports.__esModule = true;\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?"); /***/ }) diff --git a/test/comparison-tests/run-tests.js b/test/comparison-tests/run-tests.js index b28957323..248ac9d2c 100644 --- a/test/comparison-tests/run-tests.js +++ b/test/comparison-tests/run-tests.js @@ -4,6 +4,7 @@ const rimraf = require('rimraf'); const typescript = require('typescript'); const semver = require('semver'); const execSync = require('child_process').execSync; +const getProgram = require('./getProgram'); // We only want to run comparison tests for the latest released version const typescriptVersion = parseFloat( @@ -12,6 +13,23 @@ const typescriptVersion = parseFloat( // @ts-ignore if (typescriptVersion < 3.8 || typescriptVersion > 3.8) return; +// Build +const program = getProgram(path.resolve(__dirname, "tsconfig.json")); +const diagnostics = typescript.getPreEmitDiagnostics(program); +if (diagnostics.length) { + const formatDiagnosticHost = { + getCurrentDirectory: typescript.sys.getCurrentDirectory, + getCanonicalFileName: typescript.sys.useCaseSensitiveFileNames + ? s => s + : s => s.toLowerCase(), + getNewLine: () => typescript.sys.newLine + }; + for (const d of diagnostics) { + typescript.sys.write(typescript.formatDiagnostic(d, formatDiagnosticHost)); + } + throw new Error("Errors in the tests"); +} + // Parse command line arguments const saveOutputMode = process.argv.indexOf('--save-output') !== -1; const indexOfSingleTest = process.argv.indexOf('--single-test'); diff --git a/test/comparison-tests/tsconfig.json b/test/comparison-tests/tsconfig.json index b3ac4b3a5..46bf2df2b 100644 --- a/test/comparison-tests/tsconfig.json +++ b/test/comparison-tests/tsconfig.json @@ -7,6 +7,7 @@ "lib": ["es2016"] }, "files": [ + "getProgram.js", "create-and-execute-test.js", "run-tests.js", "newline.loader.js",