fix: filter "missed" declarations as well#347
Conversation
- these should run through the same `filter` as runs in `transform` etc
- prior to this, the plugin `exclude` would filter files in
`transform`, meaning no JS would be output for them, but would still
output declarations for these very same files that no JS was
produced for
- (this would only happen if one were using an `include` glob or
something that made the file appear twice, i.e. once by Rollup
in `transform` and once in `parsedConfig.fileNames`)
- this change makes it so the plugin `exclude` affects both JS
and DTS output equivalently
- it was very confusing when it didn't, and users relied on setting
different `tsconfig` `exclude`s to workaround this (as a
`tsconfig` `exclude` would make the file not appear in
`parsedConfig.fileNames`)
|
Huh, so I was looking into So this PR undoes that line. And with #176 and #346, basically that entire commit is undone.... Considering #283 is caused by the follow-up commit, it seems like the entire It seems to have been created for #162 and #136 (comment) :
In any case, the main impact of |
|
Yeaaaa, did some more digging and per #283 (comment) , The last two fixes for those regressions, this PR and #365, have yet to be released either, so like big OOF on how many regressions for how many years that's caused 😕 😕 |
Summary
Only output declarations for files that pass the
filtercheck so there isn't a mismatch between JS beingexcluded, but DTS declarations still being output.excludefilters.jsoutput, but not.d.ts(pluginexcludevs.tsconfigexclude) #225tsconfigexcludevs pluginexclude) #280include/excludevs.tsconfiginclude/excludethat I mentioned in fix(github): improve formatting of issue template spoilers #311 (comment)Details
filteras runs intransformetcexcludewould filter files intransform, meaning no JS would be output for them, but would still output declarations for these very same files that no JS was produced forincludeglob or something that made the file appear twice, i.e. once by Rollup intransformand once inparsedConfig.fileNames)excludeaffects both JS and DTS output equivalentlytsconfigexcludes to workaround this (as atsconfigexcludewould make the file not appear inparsedConfig.fileNames)