-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: filter
"missed" declarations as well
#347
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
filter
check so there isn't a mismatch between JS beingexclude
d, but DTS declarations still being output.exclude
filters.js
output, but not.d.ts
(pluginexclude
vs.tsconfig
exclude
) #225tsconfig
exclude
vs pluginexclude
) #280include
/exclude
vs.tsconfig
include
/exclude
that I mentioned in fix(github): improve formatting of issue template spoilers #311 (comment)Details
filter
as runs intransform
etcexclude
would 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 forinclude
glob or something that made the file appear twice, i.e. once by Rollup intransform
and once inparsedConfig.fileNames
)exclude
affects both JS and DTS output equivalentlytsconfig
exclude
s to workaround this (as atsconfig
exclude
would make the file not appear inparsedConfig.fileNames
)