Closed agilgur5 closed 4 years ago
Ah, also should note that from my local test runs, the time it took to run all tests decreased by 10-15%, which is a substantial perf improvement! If this tiny change was so substantial, switching to per-ouput plugins is really going to be big when building multiple output formats 😮
every other emission is just a duplicate -- no need to spend compute time to make duplicates
tsconfig
include
fixes a long-standing bug with the deprecated moveTypes() function that would occasionally cause types to not be properly output
also fixes a bug with an initial version of multi-entry where if an entry in a subdir of src/ were added, e.g. src/foo/bar, the entire tree of type declarations would get output into dist/foo/src/*.d.ts
moveTypes()
with an arg for each entry, but there's no need since all declarations get produced the first time around anyway--preserveModules
that used separate format directoriesAlso threw in another TS optimization here with the
cacheRoot
change that's along the same lines but slightly different of a change.This is extracted out of #367 's 14b539763ef21, but is a better version in a few ways:
declarationMap
s as they've also been set tofalse
. Otherwise would get errors / test failures that you can't havedeclarationMap
s withoutdeclaration
s: undefined
still overrode somedeclaration
/declarationMap
settings, also causing errors / test failures, so changed this to not set either on the first emissionmoveTypes()
was moved into athen
of theasyncro()
so that it's still part of the progress estimation.The bugs this fixed in #367 and by extension #535 should no longer be present anyway since #367 switched/improved to use Rollup's code-splitting instead of a separate build & bundle per entry and #535 will need to be updated to use the same
output.entryFileNames
as a later version of #367 used instead of using separate format dirs.I also realized that this might fix the bugs with
moveTypes()
that gave us so many CI issues prior to #504 very recently in https://github.com/jaredpalmer/tsdx/pull/500#issuecomment-605530750. And indeed this does fix those bugs, hence the removals of the error throwaways and a change in the deprecation message by a bit (it's still a problematic option, with another caveat other than those listed thatmoveTypes()
doesn't apply to customdeclarationDir
s, though that could be fixed). I tested that this was the case by changingrootDir
to./
in every test fixture and running tests a couple of times and no errors were thrown anymore!The
cacheRoot
optimization is also related to #328 / #329. And might make #618 obsolete.